Electron beam exposure or system inspection or measurement apparatus and its method and height detection apparatus

ABSTRACT

An electron beam apparatus includes a movable table which mounts a specimen, an electron optical system including an electron beam source which emits electron beams, an element for deflecting the emitted electron beams, an objective lens for converging and irradiating the deflected electron beams onto the specimen mounted on the table, and a detector for detecting a secondary electron emanated from the specimen by the irradiation of the electron beams. A surface height detection unit is provided which optically detects a height of a surface of the specimen by projecting light onto the surface of the specimen from an oblique direction to the surface and detecting light reflected from the specimen. A focus controller is provided for focusing the electron beam onto the surface of the specimen by controlling a position of the table in a height direction in accordance with the height information from the surface height detection unit.

CROSS REFERENCE TO RELATED APPLICATION

[0001] This is a continuation of U.S. application Ser. No. 09/642,014,filed Aug. 21, 2000, which is a continuation of U.S. application Ser.No. 09/132,220, filed Aug. 11, 1998, now U.S. Pat. No. 6,107,637, thesubject matter of which is incorporated by reference herein.

BACKGROUND OF THE INVENTION

[0002] The present invention relates to an electron beam exposure orsystem inspection or measurement or processing apparatus having anobservation function using charged particle beams such as electron beamsor ion beams and its method and an optical height detection apparatus.

[0003] Heretofore, a focus of an electron microscope has been adjustedby adjusting a control current of an objective lens while an electronbeam image is observed. This process requires a lot of time, and also, asample surface is scanned by electron beams many times. Accordingly,there is the possibility that a sample will be damaged.

[0004] In order to solve the above-mentioned problem, in a prior-arttechnique (Japanese laid-open patent application No. 5-258703), there isknown a method in which a control current of an optimum objective lensrelative to a height of a sample surface in several samples are measuredin advance before the inspection is started and focuses of respectivepoints are adjusted by interpolating these data when samples areinspected.

[0005] In this method, SEM images obtained by changing an objective lenscontrol current at every measurement point are processed, and anobjective lens control current by which an image of a highest sharpnessis recorded. It takes a lot of time to measure an optimum controlcurrent before inspection. Moreover, there is the risk that a samplewill be damaged due to the irradiation of electron beams for a longtime. Further, there is the problem that a height of a sample surfacewill be changed depending upon a method of holding a wafer during theinspection.

[0006] Moreover, as the prior-art technique of the apparatus forinspecting a height of a sample, there are known Japanese laid-openpatent application No. 58-168906 and Japanese laid-open patentapplication No. 61-74338.

[0007] According to the above-mentioned prior art, in the electron beamapparatus, the point in which a clear SEM image without image distortionis detected and a defect of a very small pattern formed on the inspectedobject like a semiconductor wafer such as ULSI or VLSI is inspected anda dimension of a very small pattern is measured with high accuracy andwith high reliability has not been considered sufficiently.

SUMMARY OF THE INVENTION

[0008] It is therefore an object of the present invention is to providean electron beam exposure or system inspection or measurement apparatusand a method thereof in which the image distortion caused by thedeflection and the aberration of the electron optical system can bereduced, the decrease of the resolution due to the de-focusing can bereduced so that the quality of the electron beam image (SEM image) canbe improved and in which the inspection and the measurement of lengthbased on the electron beam image (SEM image) can be executed with highaccuracy and with high reliability.

[0009] It is another object of the present invention is to provide anelectron beam exposure or system inspection or measurement apparatus anda method thereof in which the height of the surface of the inspectedobject can be detected real time and the electron optical system can becontrolled real time so that an electron beam image (SEM image) of highresolution without image distortion can be obtained by the continuousmovement of the stage, an inspection efficiency and its stability can beimproved and in which an inspection time can be reduced.

[0010] It is a further object of the present invention to provide anelectron beam exposure apparatus and a converging ion beam manufacturingapparatus in which very small patterns can be exposed and manufacturedwithout image distortion and with a high resolution.

[0011] In order to attain the above-mentioned objects, according to thepresent invention, there is provided an electron beam system inspectionor measurement apparatus which is comprised of a detection apparatusincluding an electron optical system comprising an electron beam source,a deflection element for deflecting electron beams emitted from theelectron beam source, and an objective lens for converging andirradiating electron beams deflected by the deflection element on aninspected object, an electron beam image detection optical system fordetecting a secondary electron beam image generated from the inspectedobject by the electron beams deflected by the electron optical systemand converged and irradiated, a projection optical system for projectinga luminous flux of a repetitive light pattern or lattice shape on theinspected object from the oblique upper direction of the inspectedobject and a detection optical system for detecting the position of anoptical image by focusing the luminous flux of the repetitive lightpattern which was reflected on the surface of the inspected object bythe luminous flux of the repetitive light pattern projected by theprojection optical system, an optical height detection apparatusarranged so as to optically detect a height of the surface in an area onthe inspected object based on the change of the position of an opticalimage composed of a luminous flux of the repetitive light patterndetected by the detection optical system, a focus controller forfocusing electron beams on the inspected object in a properly-focusedstate by controlling a current flowed to or a voltage applied to anobjective lens of the electron optical system on the basis of the heightof the surface on the inspected object detected by the optical heightdetection apparatus and an image processor for inspecting or measuring apattern formed on the inspected object on the basis of the secondaryelectron beam image detected by the electron beam image detectionoptical system.

[0012] In accordance with the present invention, there is provided anelectron beam apparatus comprising a pattern writing apparatus includingan electron optical system comprising an electron beam source, adeflection element for deflecting electron beams emitted from theelectron beam source, and an objective lens for converging andirradiating electron beams deflected by deflection element on aprocessed object, a projection optical system for projecting a luminousflux a repetitive light pattern on the processed object from an obliqueupper direction of the processed object and a detection optical systemfor detecting the position of an optical image by focusing the luminousflux of the repetitive light pattern which was reflected on a surface ofthe processed object by the luminous flux of the repetitive lightpattern projected by the projection optical system, an optical heightdetection apparatus arranged so as to optically detect a height of thesurface in an area on the processed object based on the change of theposition of an optical image composed of the luminous flux of therepetitive light pattern detected by the detection optical system, and afocus controller for focusing electron beams on the processed object ina properly-focused state by controlling a current flowed to or a voltageapplied to the objective lens of the electron optical system on thebasis of the height of the surface on the inspected object detected bythe optical height detection apparatus.

[0013] Further, according to the another feature present invention,there is provided an electron beam system inspection or measurementapparatus which is comprised of a detection apparatus including anelectron optical system comprising an electron beam source, a deflectionelement for deflecting electron beams emitted from the electron beamsource, and an objective lens for converging and irradiating electronbeams deflected by the deflection element on an inspected object, anelectron beam image detection optical system for detecting a secondaryelectron beam image generated from the inspected object by the electronbeams deflected by the electron optical system and converged andirradiated, an optical height detection apparatus for opticallydetecting a height of a surface in an area on the inspected objectirradiated by electron beams deflected and converged by the electronoptical system, a focus controller for focusing electron beams on theinspected object in a properly-focused state by controlling a currentflowed to or a voltage applied to the objective lens of the electronoptical system on the basis of the height of the surface on theinspected object detected by the optical height detection apparatus, adeflection controller for correcting an image distortion containing amagnification error of electron beams generated on the basis of thefocus control by correcting a deflection amount of the electron opticalsystem to the deflection element on the basis of the height of thesurface on the inspected object detected by the optical height detectionapparatus, and an image processor for inspecting or measuring a patternformed on the inspected object on the basis of a secondary electron beamimage detected by the electron beam detection optical system.

[0014] in accordance with the present invention, there is provided anelectron beam system inspection or measurement apparatus which iscomprised of an electron optical system including an electron beamsource, a deflection element for deflecting electron beams emitted fromthe electron beam source and an objective lens for converging andirradiating electron beams deflected by the deflection element on theinspected object, an electron beam image detection system for detectinga secondary electron beam image generated from the inspected object bythe electron beams deflected and converged by the electron opticalsystem, an optical height detection apparatus for optically detecting aheight of a surface in an area on the inspected object irradiated byelectron beams deflected and converged by the electron optical system, afocus controller for calculating a focus control current or a focuscontrol voltage based on a correction parameter between a height of asurface on the inspected object and a focus control current or a focuscontrol voltage from a height of a surface on the inspected objectdetected by the optical height detection apparatus and convergingelectron beams on the inspected object in a properly-focused state bysupplying the calculated focus control current or focus control voltageto an objective lens of the electron optical system, and an imageprocessor for inspecting or measuring a pattern formed on the inspectedobject on the basis of a secondary electron beam image detected by theelectron beams image detection optical system.

[0015] The present invention also provides that the electron beam systeminspection or measurement apparatus further includes a deflectioncontroller for correcting an image distortion containing a magnificationerror of an electron beam image generated on the basis of the focuscontrol by correcting a deflection amount of the electron optical systemto a deflection element on the basis of a height of a surface on theinspected object detected by the optical height detection apparatus.

[0016] According to another feature of the present invention, there isprovided an electron beam system inspection or measurement apparatuswhich is comprised of an electron optical system including an electronbeam source, a deflection element for deflecting electron beams emittedfrom the electron beam source and an objective lens for converging andirradiating electron beams deflected by the deflection element on theinspected object, an electron beam image detection system for detectinga secondary electron beam image generated from the inspected object bythe electron beams deflected and converged by the electron opticalsystem, an optical height detection apparatus for optically detecting aheight of a surface in a place in which a focus control delay is shiftedin an area on the inspected object irradiated with electron beams by theelectron optical system, a focus controller for calculating a focuscontrol current or a focus control voltage based on a correctionparameter between a height of a surface on the inspected object and afocus control current or a focus control voltage from a height of asurface on the inspected object detected by the optical height detectionapparatus and converging electron beams on the inspected object in aproperly-focused state by supplying the calculated focus control currentor focus control voltage to an objective lens of the electron opticalsystem, and an image processor for inspecting or measuring a patternformed on the inspected object on the basis of a secondary electron beamimage detected by the electron beam image detection optical system.

[0017] According to the present invention, the electron beam systeminspection or measurement apparatus further includes a deflectioncontroller for correcting an image distortion containing a magnificationerror of an electron beam image generated on the focus control bycorrecting a deflection amount of the electron optical system to adeflection element on the basis of a height of a surface in a place inwhich a focus control delay is shifted on the inspected object detectedby the optical height detection apparatus.

[0018] Further, according to the present invention, there is provided anelectron beam system inspection or measurement apparatus which iscomprised of an electron optical system including an electron beamsource, a deflection element for deflecting electron beams emitted fromthe electron beam source and an objective lens for converging andirradiating electron beams deflected by the deflection element on theinspected object, an electron beam image detection system for detectinga secondary electron beam image generated from the inspected object bythe electron beams deflected and converged by the electron opticalsystem, an optical height detection apparatus for optically detecting aheight of a surface in a place in which a position displacementcorrected amount is shifted in an area on the inspected objectirradiated with electron beams by the electron optical system, a focuscontroller for calculating a focus control current or a focus controlvoltage based on a correction parameter between a height of a surface onthe inspected object and a focus control current or a focus controlvoltage from a height of a surface in which a position displacementcorrected amount is shifted in an area on the inspected object detectedby the optical height detection apparatus and converging electron beamson the inspected object in a properly-focused state by supplying thecalculated focus control current or focus control voltage to anobjective lens of the electron optical system, and an image processorfor inspecting or measuring a pattern formed on the inspected object onthe basis of a secondary electron beam image detected by the electronbeams image detection optical system.

[0019] According to the present invention, the electron beam systeminspection or measurement apparatus further includes deflectioncontroller for correcting an image distortion containing a magnificationerror of an electron beam image generated on said focus control bycorrecting a deflection amount of said electron optical system to adeflection element on the basis of a height of a surface in a place inwhich a position displacement correction amount is shifted on theinspected object detected by the optical height detection apparatus.

[0020] Further, according to the present invention, the optical heightdetection apparatus in the electron beam system inspection ormeasurement apparatus includes a projection optical system forprojecting a luminous flux of linear or lattice shape or a repetitivelight pattern on the inspected object from the oblique upper directionof the inspected object and a detection optical system for detecting aposition of an optical image by focusing a luminous flux reflected onthe surface of the inspected object by the luminous flux projected bythe projection optical system, and in which a height of a surface of theinspected object is detected on the basis of the change of the positionof an optical image detected by the detection optical system.

[0021] Additionally, according to the present invention, the opticalheight detection apparatus in the electron beam system inspection ormeasurement apparatus includes a plurality of projection optical systemsfor projecting a luminous flux of linear or lattice shape or repetitivelight pattern on the inspected object from the oblique upper directionof the inspected object and detection optical systems for detecting aposition of an optical image by focusing a luminous flux reflected onthe surface of the inspected object by the luminous flux projected bythe projection optical systems disposed symmetrically with respect to anoptical axis of the electron optical system, and in which positionchanges of optical images detected by the respective detection opticalsystems are synthesized and a height of a surface of the inspectedobject is detected on the basis of the position change of thesynthesized optical image.

[0022] Further, according to the present invention, white light is usedas the luminous flux projected by the projection optical system in theoptical height detection apparatus of the electron beam systeminspection or measurement apparatus. Further, according to the presentinvention, S-polarized light is used as the luminous flux projected bythe projection optical system in the optical height detection apparatusof the electron beam system inspection or measurement apparatus.

[0023] According to the present invention, there is also provided anelectron beam system inspection or measurement apparatus which iscomprised of a detection apparatus including an electron optical systemcomprising an electron beam source, a deflection element for deflectingelectron beams emitted from the electron beam source, and an objectivelens for converging and irradiating electron beams deflected by thedeflection element on an inspected object, an electron beam imagedetection optical system for detecting a secondary electron beam imagegenerated from the inspected object by the electron beams deflected bythe electron optical system and converged and irradiated, a projectionoptical system for projecting a luminous flux of lattice shape or arepetitive light pattern on the inspected object from the oblique upperdirection of the inspected object and a detection optical system fordetecting the position of an optical image by focusing the luminous fluxof lattice shape or repetitive light pattern which was reflected on thesurface of the inspected object by the luminous flux of lattice shape orrepetitive light pattern projected by the projection optical system, anoptical height detection apparatus arranged so as to optically detect aheight of the surface in an area on the inspected object based on thechange of the position of an optical image composed of a luminous fluxof lattice shape or repetitive light pattern detected by the detectionoptical system, a focus controller for focusing electron beams on theinspected object in a properly-focused state by controlling a relativeposition of a height direction between a focus position obtained by theelectron optical system and a table for holding the inspected object onthe basis of the height of the surface on the inspected object detectedby the optical height detection apparatus and an image processor forinspecting or measuring a pattern formed on the inspected object on thebasis of the secondary electron beam image detected by the electron beamimage detection optical system.

[0024] According to other features of the present invention, there isprovided an electron beam system inspection or measurement method whichis comprised of the steps of moving an inspected object at least in apredetermined direction, optically detecting a height of a surface in anarea on the inspected object irradiated with electron beams from anoptical height detection apparatus on the basis of the change of theposition of an optical image composed of a luminous flux of a repetitivelight pattern or lattice shape, deflecting electron beams emitted froman electron beam source by a deflection element of an electron opticalsystem and focusing the same on the inspected object by controlling acurrent flowed to or a voltage applied to an objective lens of theelectron optical system based on the height of the surface on thedetected inspected object in a properly-focused state, detecting asecondary electron beam image generated from the inspected object byirradiated electron beams deflected and focused in a properly-focusedstate by an electron beam image detection optical system, and inspectingor measuring a pattern formed on the inspected object based on thedetected secondary electron beam image.

[0025] Further, according to additional features the present invention,there is provided an electron beam system inspection or measurementmethod comprising the steps of moving an inspected object at least in apredetermined direction, optically detecting a height of a surface in anarea on the inspected object irradiated with electron beams by anoptical height detection apparatus, deflecting election beams emittedfrom an electron beams source by a deflection element of an electronoptical system by controlling a current flowed to or a voltage appliedto an objective lens of the electron optical system on the basis of theheight of the surface on the detected inspected object such that theelection beams are converged on the inspected object in aproperly-focused state, correcting an image distortion containing amagnification error of an electron beam image generated based on thefocus control by correcting a deflection amount to a deflection elementof the electron optical system, detecting a secondary electron beamimage generated from the inspected object by electron beams corrected,deflected, converged in a properly-focused state and irradiated by meansof an electron beam detection optical system, and inspecting ormeasuring a pattern formed on the inspected object on the basis of thedetected secondary electron beam image.

[0026] According to the present invention, there is provided an electronbeam system inspection or measurement method which is comprised of thesteps of moving the inspected object at least in a predetermineddirection, optically detecting a height of a surface in an area on aninspected object irradiated with electron beams from an optical heightdetection apparatus, calculating a focus control current or a focuscontrol voltage on the basis of a correction parameter between theheight of the surface on the inspected object and a focus controlcurrent or a focus control voltage, deflecting electron beams emittedfrom the electron beam source and focusing the same on the inspectedobject in a properly-focused state by supplying the calculated focuscontrol current or focus control voltage to an objective lens of theelectron optical system, detecting a secondary electron beam imagegenerated from the inspected object by irradiated electron beamsdeflected and focused in a properly-focused state by an electron beamimage detection optical system, and inspecting or measuring a patternformed on the inspected object on the basis of the detected secondaryelectron beam image.

[0027] Further, according to the present invention, the electron beamsystem inspection or measurement method further includes the step ofcorrecting an image distortion containing a magnification error of anelectron beam image generated on the basis of the focus control bycorrecting a deflection amount of a deflection element of the electronoptical system on the basis of a height of a surface on the detectedinspected object.

[0028] Additionally, according to the present invention, there isprovided an electron beam system inspection or measurement method whichis comprised of the steps of moving an inspected object at least in apredetermined direction, optically detecting a height of a surface in anarea on the inspected object irradiated with electron beams by anoptical height detection apparatus, calculating a focus control currentor a focus control voltage on basis of a correction parameter betweenthe height of the surface on the inspected object and a focus controlcurrent or a focus control voltage from a height of a surface in a placein which a focus control delay on the detected inspected object isshifted, deflecting electron beams emitted from an electron beam sourceby a deflection element of an electron optical system and focusing thesame on the inspected object in a properly-focused state by supplyingthe calculated focus control current or focus control voltage to anobjective lens of the electron optical system, detecting a secondaryelectron beam image generated from the inspected object with irradiatedelectron beams deflected and focused in a properly-focused state by anelectron beam image detection optical system, and inspecting ormeasuring a pattern formed on the inspected object on the basis of thedetected secondary electron beam image.

[0029] There is provided an electron beam system inspection ormeasurement method which is comprised of the steps of moving aninspected object at least in a predetermined direction, opticallydetecting a height of a surface in an area on the inspected objectirradiated with electron beams by an optical height detection apparatus,calculating a focus control current or a focus control voltage on basisof a correction parameter between the height of the surface on theinspected object and a focus control current or a focus control voltagefrom a height of a surface in a place in which a position displacementcorrected amount on the detected inspected object is shifted, deflectingelectron beams emitted from an electron beam source by a deflectionelement of an electron optical system and focusing the same on theinspected object in a properly-focused state by supplying the calculatedfocus control current or focus control voltage to an objective lens ofthe electron optical system, detecting a secondary electron beam imagegenerated from the inspected object with irradiated electron beamsdeflected and focused in a properly-focused state by an electron beamimage detection optical system, and inspecting or measuring a patternformed on the inspected object on the basis of the detected secondaryelectron beam image.

[0030] In accordance with the present invention, there is also providedan electron beam system inspection or measurement method which iscomprised of the steps of moving an inspected object at least in apredetermined direction, optically detecting a height of a surface in anarea on the inspected object irradiated with electron beams from anoptical height detection apparatus, deflecting electron beams emittedfrom an electron beam source by a deflection element of an electronoptical system and focusing the same on the inspected object in aproperly-focused state by controlling a relative position of a heightdirection between a focus position of an electron optical system and atable for holding the inspected object on the basis of a height of asurface on the detected inspected object, detecting a secondary electronbeam image generated from the inspected object by irradiated electronbeams deflected and focused in a properly-focused state by an electronbeam image detection optical system, and inspecting or measuring apattern formed on the inspected object on the basis of the detectedsecondary electron beam image.

[0031] Further, according to the present invention, there is provided anoptical height detection apparatus which is comprised of a plurality ofprojection optical systems for projecting a luminous flux of linear orlattice shape or repetitive light pattern on the inspected object fromthe oblique upper direction of the inspected object and detectionoptical systems for detecting a position of an optical image by focusinga luminous flux reflected on the surface of the inspected object by theluminous flux projected by the projection optical systems disposedsymmetrically with respect to a predetermined optical axis, and in whichposition changes of optical images detected by the respective detectionoptical systems are synthesized and a height of a surface of theinspected object is detected on the basis of the position change of thesynthesized optical image.

[0032] Other features of the present invention include that in theoptical height detection apparatus, a one-dimensional or two-dimensionalimage sensor is used as a detector for detecting the change of theposition of the optical image. Further, as the detector for detectingthe change of the position of the optical image, a mask having atransmission pattern similar to a projection pattern is vibrated and aphotoelectric detector such as a photodiode is disposed behind the mask,whereby the change of the position is detected by asynchronizing-detection. Additionally, a shape formed by repeatedlyarranging a plurality of rectangular patterns is used as a shape ofluminous flux projected onto an object.

[0033] Also, white light is used as a luminous flux projected onto anobject. Further, a luminous flux is projected onto an object with anangle greater than 60 degrees and S-polarized light is used as aluminous flux projected onto an object. Further, the optical heightdetection apparatus includes two height detectors, and the two heightdetectors are disposed symmetrically with respect to a normal from ameasured position on an object. Height detection values of the twoheight detectors are combined so that a height of the same observationposition on the object can be constantly detected with high accuracyregardless of the change of the height of the object, the change of theinclination or the surface state of the object. Also, in the opticalheight detection apparatus, one or a plurality of height measurementpatterns are selected from a plurality of pattern images and a height ismeasured by using these patterns, whereby a height measurement positionon the object can be selected. Further, not only a height of an objectbut also an inclination thereof is detected by an image formed byarranging a plurality of rectangular patterns, and at least one of aheight measurement position on the object and a detection error causedby the inclination of the object is corrected by using this information.Additionally, a height distribution on the cross-section of the objectis detected by using an image formed by arranging a plurality ofrectangular patterns. Further, the image in which a plurality ofrectangular patterns are arranged is detected and processed by atwo-dimensional image sensor or an arrangement in which a plurality ofone-dimensional image sensors are disposed in parallel, whereby a heightdistribution of a two-dimensional surface of an object can be detected.

[0034] According to the present invention, there is also provided anelectron beam system automatic inspection apparatus which is comprisedof an electron optical system for converging electrons emitted from anelectron source on a focus, an observer for observing an arbitraryposition at which an inspected object is brought by a stage for holdingthe inspected object and which can be moved within a plane through theelectron optical system, a detector for continuously detecting a heightof the inspected object in an observation area of the electron opticalsystem by an optical method, and a positioner for constantly maintaininga relative position between a focus position of an electron beam imageand the inspected object by using a result of height detection andwherein an automatic inspection can be executed by processing theresultant properly-focused electron beam image to detect a defect.

[0035] Further, according to the present invention, there is provided anelectron beam system automatic inspection method which is comprised ofan electron optical system for converging electrons emitted from anelectron source on a focus, an observer for observing an arbitraryposition at which an inspected object is brought by a stage for holdingthe inspected object and which can be moved within a plane through theelectron optical system, a detector for continuously detecting a heightof the inspected object in an observation area of the electron opticalsystem by an optical method, and a positioner for constantly maintaininga relative position between a focus position of an electron beam imageand the inspected object by using a result of height detection andwherein an automatic inspection can be executed by processing theresultant properly-focused electron beam image to detect a defect.

[0036] In accordance with the present invention, the electron beamsystem automatic inspection apparatus also includes two heightdetectors. The two height detectors are disposed symmetrical withrespect to a normal from an observation position of an electron opticalsystem on an object. Height detection values of the two height detectorsare synthesized so that the height of the observation position of theelectron optical system on the object can constantly be detected withhigh accuracy regardless of the change of the height of the object, thechange of the inclination, or the surface state of the object. Theelectron beam system automatic inspection apparatus includes apositioner for constantly maintaining a relative position between thefocus position of the electron beam image and the inspected object byusing a result of height detection, and in which the automaticinspection can be executed by processing the resultant properly-focusedelectron beam to detect a defect. Further, according to the presentinvention, in the electron beam system automatic inspection apparatus,one or a plurality of slits used to measure a height are selected from aplurality of rectangular pattern images and a height is measured byusing these slits to thereby select the height measurement position onthe object. Thus, the stage scanning and a detection time delay of aheight detector or a measurement position displacement caused by anadjustment error of an optical system can be corrected. Further,according to the present invention, in the electron beam systemautomatic inspection apparatus, not only a height of an object but alsoan inclination thereof is detected by an image formed by arranging aplurality of rectangular patterns, and at least one of a heightmeasurement position on the object and a detection error caused by theinclination of the object is corrected by using this information.Further, according to the present invention, in the electron beam systemautomatic inspection apparatus, a height distribution on thecross-section of the object is detected by using an image formed byarranging a plurality of rectangular patterns, and electron beams areproperly focused on an arbitrary area of the object by using thisinformation. Further, according to the present invention, in theelectron beam system automatic inspection apparatus, the image in whicha plurality of rectangular patterns are arranged is detected andprocessed by a two-dimensional image sensor or an arrangement in which aplurality of one-dimensional image sensors are disposed in parallel,whereby a height distribution of a two-dimensional surface of an objectcan be detected, and electron beams are properly focused by using thisinformation. Further, according to the present invention, the electronbeam system automatic inspection apparatus has a function to control thefocus position of the electron beams relative to the scanning of thestage at a sufficiently high speed by the arrangement of the electronoptical system, an objective lens or an electrostatic lens or acondenser lens or a combination of one or a plurality of means of adeflection system. By using the inspected object surface height obtainedfrom the optical height detection apparatus, an electron beam image canbe obtained under the condition that the relative position between thesurface of the inspected object and the focus position of the electronbeam can be maintained constant. Further, according to the presentinvention, the electron beam system automatic inspection apparatus has afunction to control the focus position of the electron beams relative tothe scanning of the stage at a sufficiently high speed by thearrangement of the electron optical system, an objective lens or anelectrostatic lens or a condenser lens or a combination of one or aplurality of means of a deflection system. By using the inspected objectsurface shape distribution obtained from the optical height detectionapparatus, an electron beam image can be obtained under the conditionthat the relative position between the inspected object surface shapeand the orbit of the focus position of the electron beam can bemaintained constant. Further, according to the present invention, theelectron beam system automatic inspection apparatus includes a Z stagewhich can finely adjust the height of the surface of the inspectedobject at a sufficiently high speed, and an electron beam image in whichthe relative position between the surface of the inspected object andthe focus position of the electron beam can be maintained constant canbe constantly obtained by using the inspected surface height obtainedfrom the optical height detection apparatus.

[0037] Further, the present invention utilizes a correction standardpattern made of a stable material which can be prevented from beingaffected with the irradiation of charged particle beams, the surface ofwhich has a pattern that can be observed by a charged particle opticalsystem and which has at least more than two stepped differences orinclinations of which height differences are clear. Further, the presentinvention is a height detection apparatus and a charged particle opticalsystem correction method using the above-mentioned standard patternfixed to a stage for holding an inspected object. Further, the presentinvention is an electron beam system automatic inspection apparatuscapable of correcting a height detection apparatus and an electronoptical system by using the above-mentioned standard pattern fixed to astage for moving an inspected object. Furthermore, the present inventionis an electron beam system automatic inspection apparatus including anelectron optical system capable of changing a deflection amount ofelectron beams in real time in response to a fluctuation of a height ofa sample surface and which has a function to correct a magnificationbased on a fluctuation of an inspected object surface as well as toadjust the focus of electron beams. Furthermore, the present inventionis characterized by the application to apparatus (electron beam systemlength measuring apparatus, scanning electron microscope, electron beamexposing apparatus, converging ion beam manufacturing apparatus) using acharged particle optical system of the above-mentioned height detectionapparatus.

[0038] As described above, according to the above-mentioned arrangement,without being affected by the surface state of the inspected object, theimage distortion caused by the deflection and the aberration of theelectron optical system can be reduced and the decrease of theresolution due to the de-focusing can be reduced so that the quality ofthe electron beam image (SEM image) can be improved. Thus, theinspection and the measurement of length based on the electron beamimage (SEM image) can be executed with high accuracy and with highreliability.

[0039] Furthermore, according to the above-mentioned arrangement, sincethe height of the surface of the inspected object can be detected inreal time and the electron optical system can be controlled in realtime, an electron beam image (SEM image) of high resolution withoutimage distortion can be obtained by the continuous movement of thestage, and the inspection can be executed. Hence, an inspectionefficiency and its stability can be improved. In addition, an inspectiontime can be reduced.

[0040] These and other objects, features and advantages of the presentinvention will become more apparent from the following description whentaken in conjunction with the accompanying drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

[0041] FIGS. 1(a)-1(d) show a semiconductor wafer and image obtained atdifferent areas thereof so as to explain that electron beams need befocused on an inspected object such as a semiconductor wafer in anelectron beam inspection according to the present invention.

[0042]FIG. 2 is a schematic diagram of an electron beam apparatus (SEMapparatus) according to an embodiment of the present invention.

[0043]FIG. 3 is a schematic diagram showing an electron beam inspectionapparatus (SEM inspection apparatus) according to an embodiment of thepresent invention.

[0044]FIG. 4 shows an electron beam inspection apparatus (SEM inspectionapparatus) according to an embodiment of the present invention.

[0045] FIGS. 5(a)-5(c) show a semiconductor wafer in which asemiconductor memory is formed according to the present invention andenlarged portions thereof.

[0046] FIGS. 6(a) and 6(b) show a detection image f1(x, y) and acomparison image g1(x, y) which are compared and inspected in theelectron beam inspection apparatus (SEM inspection apparatus) accordingto the present invention.

[0047]FIG. 7 shows an electron beam inspection apparatus (SEM inspectionapparatus) according to another embodiment of the present invention.

[0048]FIG. 8 shows a pre-processing circuit forming a part of FIGS. 4and 7.

[0049]FIG. 9 shows curves for explaining the contents that are correctedby the pre-processing circuit shown in FIG. 8.

[0050]FIG. 10 shows a height detection optical apparatus according to anembodiment of the present invention.

[0051] FIGS. 11(a) and 11(b) are used to explain a principle in which adetection error is reduced by a multi-slit.

[0052]FIG. 12 is a diagram used to explain a detection error caused by amultiple reflection on a transparent film such as an insulating filmexisting on a semiconductor wafer or the like.

[0053]FIG. 13 shows a graph graphing the change of a reflectance versusan incident angle in silicon and resist (a transparent film such as aninsulating film) existing on a semiconductor wafer or the like.

[0054]FIG. 14 shows waveforms used to explain a height detectionalgorithm processed by a height calculating unit of a height detectionapparatus according to an embodiment of the present invention.

[0055]FIG. 15 shows an arrangement in which a measured positiondisplacement is canceled out by both-side projections of a heightdetection optical apparatus in a height detection apparatus according toa second embodiment of the present invention.

[0056]FIG. 16 shows an arrangement in which a detection error is reducedby a polarizing plate of a height detection optical apparatus in aheight detection apparatus according to a third embodiment of thepresent invention.

[0057]FIG. 17 is a diagram used to explain the manner in which adetection error caused by a detection position displacement when asample is inclined in the height detection optical apparatus accordingto the present invention.

[0058]FIG. 18 is a diagram used to explain the manner in which adetection error caused by the inclination of a sample is eliminated inthe height detection optical apparatus according to the presentinvention.

[0059] FIGS. 19(a) and 19(b) are diagrams used to explain the manner inwhich a height is detected by the selection of the slit under thecondition that a detection position is not displaced by a height of asample surface in the height detection apparatus according to thepresent invention.

[0060]FIG. 20 is a diagram used to explain a height detection which cancorrect a detection position displacement caused by a detection timedelay and a sample scanning on the basis of the selection of the slit inthe height detection apparatus according to the present invention.

[0061]FIG. 21 is a diagram used to explain the manner in which a heightof an arbitrary point can be detected by using detected surface-shapedata in the height detection apparatus according to the presentinvention.

[0062]FIG. 22 is a diagram used to explain a detection time delaycorrection method that can be used regardless of a scanning direction ofa stage and a projection-detection direction of a multi-slit in theheight detection apparatus according to the present invention.

[0063]FIG. 23 is a diagram used to explain a detection time delaycorrection method that can be used regardless of a scanning direction ofa stage and a projection-detection direction of a multi-slit in theheight detection apparatus according to the present invention.

[0064]FIG. 24 is a diagram used to explain the manner in which a dynamicfocus adjustment of electron beam is executed by using surface shapedata detected from the height detection apparatus according to thepresent invention.

[0065]FIG. 25 shows an arrangement in which a measured positiondisplacement is canceled out by both-side projections in a heightdetection optical apparatus according to another embodiment of thepresent invention.

[0066]FIG. 26 shows an arrangement in which a measured positiondisplacement is canceled out by both-side projections in a heightdetection optical apparatus according to another embodiment of thepresent invention.

[0067]FIG. 27 shows an embodiment in which the same position isconstantly detected by elevating and lowering a detector in a heightdetection optical apparatus according to the present invention.

[0068]FIG. 28 is a diagram showing a direction of a projection slit anda pattern on a sample in a height detection optical apparatus accordingto the present invention.

[0069] FIGS. 29(a) and 29(b) are diagrams showing a detection positiondisplacement and the manner in which a detection position displacementis decreased in a height detection optical apparatus according to thepresent invention.

[0070]FIG. 30 shows an example of an arrangement in which a heightdistribution on a surface is measured in a height detection opticalapparatus according to the present invention.

[0071]FIG. 31 shows waveforms used to explain the embodiment in which aposition of a multi-slit pattern is detected by a Gabor filter which isa height detection algorithm processed by a height calculating means ina height detection apparatus according to the present invention.

[0072]FIG. 32 is a graph in which a slit edge position which is a heightdetection algorithm processed by a height calculating means is measuredin a height detection apparatus according to the present invention.

[0073] FIGS. 33(a) and 33(b) show an embodiment in which a position of amulti-slit image is measured by a vibrating mask in a height detectionapparatus according to the present invention.

[0074]FIG. 34 shows an electron beam apparatus in which a standardpattern for correction is disposed on an X-Y stage.

[0075]FIG. 35 shows in a perspective view a standard pattern forcorrection with an inclined portion.

[0076] FIGS. 36(a)-36(c) are graphs used to explain a correction curveobtained by a standard pattern for correction in an electron beamapparatus according to the present invention.

[0077] FIGS. 37(a) and 37(b) show in perspective view standard patternsfor correction according to other embodiments of the present invention.

[0078]FIG. 38 is a flowchart showing a processing for calculating aparameter for correction.

[0079]FIG. 39 is a flowchart in which a stage is driven at a constantspeed and an appearance is inspected while an error is corrected byusing a correction parameter in an electron beam inspection apparatusaccording to the present invention.

[0080]FIG. 40 is a schematic diagram showing an optical appearanceinspection apparatus according to another embodiment of the presentinvention.

[0081] FIGS. 41(a) and 41(b) show multi-slit patterns in which thecenter spacing between the multi-slit patterns is increased and in whichthe center slit is made wider, respectively.

DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0082] An embodiment of an automatic inspection system forinspecting/measuring a micro-circuit pattern formed on a semiconductorwafer which is an inspected object according to the present inventionwill be described. A defect inspection of the micro-circuit patternformed on the semiconductor wafer or the like is executed by comparinginspected patterns and good pattern and patterns of the same kind on theinspected wafer. Also in the case of an appearance inspection using anelectron microscope image (SEM image), a defect inspection is executedby comparing pattern images. Furthermore, also in the case of the lengthmeasurement (SEM length measurement) executed by a scanning-typeelectron microscope which measures a line width or a hole diameter of amicro-circuit pattern used to set or monitor a manufacturing processcondition of semiconductor devices, the length measurement can beautomatically executed by the image processing.

[0083] In the comparison inspection for detecting a defect by comparingelectron beam images of a similar pattern or when a line width of apattern is measured by processing an electron beam image, a quality ofan obtained electron beam image exerts a serious influence upon thereliability of the inspected results. The quality of electron beam imageis deteriorated by an image distortion caused by deflection andaberration of an electron optical system and is also deteriorated asresolution is lowered by a de-focusing. The deterioration of the imagequality lowers a comparison and inspection efficiency and a lengthmeasurement efficiency.

[0084] Referring now to the drawings, a height of a surface of aninspected object is not even and an inspection is executed over thewhole range of heights under the same condition for a wafer as shown inFIG. 1(a), then as shown in FIGS. 1(b)-(d), electron beam images (SEMimages) are changed in accordance with the inspection portions (area A,area B, area C). As a result, if an inspection is carried out bycomparing an image (electron beam image of area A (height za) of aproperly-focused point shown in FIG. 1(b), a de-focused image (electronbeam image of area B (height zb) shown in FIG. 1(c), and a defocusedimage (electron beam image of area C (height zc) shown in FIG. 1(d),then a correct inspected result cannot be obtained. Moreover, in theseimages, the width of the pattern is changed, and an edge detected resultof an image cannot be obtained stably so that the line width and thehole diameter of the pattern also cannot be measured stably.

[0085] An electron beam apparatus according to an embodiment of thepresent invention will be described with reference to FIG. 2. Anelectron beam apparatus 100 composed of an electron beam column forirradiating electron beams on an inspected object (sample) 106 comprisesan electron beam source 101 for emitting electron beams, a deflectionelement 102 for deflecting electron beams emitted from the electron beamsource 101 in a two-dimensional fashion, and an objective lens 103 whichis controlled so as to focus the electron beam on the sample 106.Specifically, the electron beam emitted from the electron beam source101 is passed through the deflection element 102 and the objective lens103 and focused on the sample 106. The sample 106 rests on an XY stage105 and the position thereof is measured by a laser length measuringsystem 107. Further, in the case of an SEM apparatus, a secondaryelectron emitted from the sample 106 is detected by a secondary electrondetector 104, and a detected secondary electron signal is converted byan A/D converter 122 into an SEM image. The SEM image thus converted isprocessed by an image processing unit 124. In the case of the lengthmeasuring SEM, for example, the image processing unit 124 measures adistance between patterns of a designated image. Also, in the case of anobservation SEM (appearance inspection based on the SEM image), theimage processing unit 124 executes a processing such as emphasis of theimage or the like. The secondary electron includes a secondary electronwith a higher energy level which is sometimes called a back-scatteredelectron. From the viewpoint of forming scanning electron images, it isnot meaningful to discriminate between the back-scattered electron andthe secondary electron.

[0086] In accordance with the present invention, an electron beam imageis prevented from being deteriorated in the above-mentioned electronbeam apparatus (observation SEM apparatus, length measuring SEMapparatus).

[0087] The quality of the electron beam image is deteriorated due toimage distortion caused by deflection and aberration of the electronoptical system, and a resolution is lowered by de-focusing. Forpreventing the image quality from being deteriorated, the presentinvention provides, as shown in FIG. 2, a height detection apparatus 200composed of a height detection optical apparatus 200 a and a heightcalculating unit 200 b, a focus control apparatus 109, a deflectionsignal generating apparatus 108, and an entirety control apparatus 120.

[0088] The height detection apparatus 200 composed of the heightdetection optical apparatus 200 a and the height calculating unit 200 bis arranged substantially similarly to a second embodiment which will bedescribed later, and is installed about an optical axis 110 of anelectron beam symmetrically with respect to the sample 106. Anillumination optical system of each height detection optical apparatus200 a comprises a light source 201, a condenser lens 202, a mask 203with a multi-slit pattern, a half mirror 205, and a projection/detectionlens 220. A detection optical system of each height detection opticalapparatus 200 a comprises a projection/detection lens 220, a magnifyinglens 264 for focusing an intermediate multi-slit image focused by theprojection/detection lens 220 on a line image sensor 214 in an enlargedscale, a mirror 206, a cylindrical lens (cylindrical lens) 213, and aline image sensor 214.

[0089] By the illumination optical system of the respective heightdetection optical apparatus which is installed symmetrically, amulti-slit shaped pattern is projected at the measurement position onthe sample 106 for detecting an SEM image with the above-mentionedirradiation of electron beams. This regularly-reflected image is focusedby the detection optical system of each height detection opticalapparatus 200 a and thereby detected as a multi-slit image.Specifically, since the height detection optical apparatus 200 aprojects and detects patterns of multi-slit shape from the left andright symmetrical directions and the height calculating unit 200 bconstantly obtains a height of a constant point 110 by averaging bothdetected values, it is necessary to locate a pair of height detectionoptical apparatus 200 a in the left and right directions. Initially, alight beam emitted from the light source 201 is converged by thecondenser lens 202 in such a manner that a light source image is focusedat the pupil of the projection/detection lens. This light beam furtherilluminates the mask 203 on which the multi-slit shaped pattern isformed. Of the light beams, the light beam that was reflected on thehalf mirror 205 is projected by the projection/detection lens 220 ontothe sample 106. The multi-slit pattern that was projected onto thesample is regularly reflected and passed through theprojection/detection lens 220 of the opposite side. Then, the light beampassed through the half mirror 205 is focused in front of the magnifyinglens 264. This intermediate image is focused on the line image sensor214 by the magnifying lens 264. At that time, of the luminous flux, theportion that was passed through the half mirror 205 is focused on theline image sensor 214. In this embodiment, the cylindrical lens 213 isdisposed ahead of the line image sensor 214 to compress the longitudinaldirection of the slit and thereby the light beam is converged on theline image sensor 214. Assuming that m is a magnification of thedetection optical system, then when the height of the sample is changedby z, a multi-slit image is shifted by 2 mz sinθ on the whole. Byutilizing this fact, the height calculating unit 200 b calculates ashift amount of the multi-slit image from a signal of a multi-slit imagedetected from the detection optical system of each height detectionoptical apparatus 200 a, calculates a height of a sample from thecalculated shift amount of the multi-slit image, and obtains a height onthe electron beam optical axis 110 on the sample by averaging thesecalculated heights of the sample. Specifically, the height calculatingmeans 200 b calculates the height of the sample 106 from the shiftamounts of the right and left multi-slit images. Here, an average valuetherebetween is calculated by using the height detected values obtainedfrom the right and left detection system 200 a, and is set to a heightdetection value at the final point 110. The position 110 at which theheight is to be detected becomes an optical axis of the upperobservation system.

[0090] Incidentally, while the height detection optical apparatus 200 ais arranged substantially similarly to a second embodiment as shown inFIG. 15 as described above, it is apparent that the optical systemaccording to the first embodiment as shown in FIG. 10 or an opticalsystem according to a third embodiment as shown in FIG. 16 or opticalsystems according to embodiments as shown in FIGS. 25, 26, 27, 30 may beused.

[0091] The focus control apparatus 109 drives and controls anelectromagnetic lens or an electrostatic lens on the basis of heightdata 190 obtained from the height calculating unit 200 b to therebyfocus an electron beam on the surface of the sample 106.

[0092] A deflection signal generating apparatus 108 generates thedeflection signal 141 to the deflection element 102. At that time, thedeflection signal generating apparatus 108 corrects the deflectionsignal 141 on the basis of the height data obtained from the heightcalculating unit 200 b in such a manner as to compensate for an imagemagnification fluctuation caused by the fluctuation of the height of thesurface of the sample 106 and an image rotation caused by the control ofthe electromagnetic lens 103. Incidentally, if an electrostatic lens isused as the objective lens 103 instead of the electromagnetic lens, thenthe image rotation caused when the focus is controlled does not occur sothat the image rotation need not be corrected by the height data 190.Further, if lens 103 is comprised of a combination of an electromagneticlens and an electrostatic lens, the electromagnetic lens has a mainconverging action and the electrostatic lens adjusts the focus position,then the image rotation, of course, need not be corrected by the heightdata 190.

[0093] Further, instead of directly controlling the focus position ofthe electromagnetic lens or the electrostatic lens 103 by the focuscontrol apparatus 109 under the condition that the stage 105 is used asan XYZ stage, the height of the stage 105 may be controlled.

[0094] The entirety control apparatus 120 controls the whole of theelectron beam apparatus (SEM apparatus), displays a processed resultprocessed by the image processing apparatus 124 on a display 143 orstores the same in a memory 142 together with coordinate data for thesample. Also, the entirety control apparatus 120 controls the heightcalculating unit 200 b, the focus control apparatus 109 and thedeflection signal generating apparatus 108 thereby to realize ahigh-speed auto focus control in the electron beam apparatus and animage magnification correction and an image rotation correction causedby this focus control. Furthermore, the entirety control apparatus 120executes a correction of a height detected value, which will bedescribed later.

[0095]FIG. 3 shows a defect detection apparatus using an SEM imageaccording to an embodiment of the present invention. Specifically, theappearance inspection apparatus using an SEM image comprises an electronbeam source 101 for generating electron beams, a beam deflector 102 forforming an image by scanning beams, an objective lens 103 for focusingelectron beams on an inspected object 106 formed of a wafer or the like,a grid 118 disposed between the objective lens 103 and an inspectedobject 106, a stage 105 for holding, scanning or positioning theinspected object 106, a secondary electron detector 104 for detectingsecondary electrons generated from the inspected object 106, a heightdetection optical apparatus 200 a, a focus position control apparatus109 for adjusting a focus position of the objective lens 103, anelectron beam source potential adjusting unit 121 for controlling avoltage of the electron beam source, a deflection control apparatus(deflection signal generating apparatus) 108 for realizing a beamscanning by controlling the beam deflector 102, a grid potentialadjusting unit 127 for controlling a potential of the grid 118, a sampleholder potential adjusting unit 125 for adjusting a potential of asample holder, an A/D converter 122 for A/D-converting a signal from thesecondary electron detector 104, an image processing circuit 124 forprocessing a digital image thus A/D-converted, an image memory 123therefor, a stage control unit 126 for controlling the stage, anentirety control unit 120 for controlling the entirety, and a vacuumsample chamber (vacuum reservoir) 100. A height detection value 190 ofthe height detection sensor 200 is constantly fed back to the focusposition control apparatus 109 and a deflection control apparatus(deflection signal generating apparatus) 108. When the inspected object106 is inspected, the entirety control unit 120 continuously moves thestage 105 by issuing a command to the stage control apparatus 126.Concurrently therewith, the entirety control unit 120 issues a commandto the deflection control apparatus (deflection signal generatingapparatus) 108, and the deflection control apparatus 108 drives the beamdeflector 102 to scan electron beams in the direction perpendicularthereto. Simultaneously, the deflection control apparatus 108 receivesthe height detection value 190 obtained from the height calculating unit200 b and corrects a deflection direction and a deflection width. Thefocus position control apparatus 109 drives the electromagnetic lens orelectrostatic lens 103 in accordance with the height detection value 190obtained from the calculating unit 200 b, and corrects aproperly-focused height of electron beam. At that time, the secondaryelectron detector 104 detects secondary electrons generated from thesample 106 and enters the detected secondary electron into the A/Dconverter 122 to thereby continuously obtain SEM images.

[0096] When the appearance of the inspected object is inspected based onthe SEM image, a two-dimensional SEM image should be obtained over acertain wide area. As a result, driving the beam deflector 102 to scanelectron beams in the direction substantially perpendicular to themovement direction of the stage 105 while the stage 105 is beingcontinuously moved, it is necessary to detect a two-dimensionalsecondary electron image signal by the secondary electron detector 104.Specifically, while the stage 105 is being continuously moved in the Xdirection, for example, the beam deflector 102 is moved to scan electronbeams in the Y direction substantially perpendicular to the movementdirection of the stage 105, and then the stage 105 is moved in astepwise fashion in the Y direction. Thereafter, while the stage 105 isbeing continuously moved in the X direction, the beam deflector 102 isdriven to scan electron beams in the Y direction substantiallyperpendicular to the movement direction of the stage 105, and atwo-dimensional secondary electron image signal has to be detected bythe secondary electron detector 104. The processes of (1) continuousmovement of the stage, (2) beam scanning, (3) optical height detection,(4) focus control and/or deflection direction and width correction, and(5) secondary electron image acquisition should be executedsimultaneously. In this way, the acquired SEM image is kept focused anddistortion-corrected while the image is being acquired continuously andspeedily. By this control, fast and high-sensitivity defect detectioncan be achieved. Then, the image processing circuit 124 comparescorresponding images or repetitive patterns by comparing an electronbeam image delayed by the image memory and an image directly inputtedfrom the A/D converter 124, thereby resulting in the comparisoninspection being realized. The entirety control unit 120 receives theinspected result at the same time it controls the image processingcircuit 124, and then displays the inspected result on the display 143or stores the same in the memory 142. Incidentally, in the embodimentshown in FIG. 3, while a focus is adjusted by controlling a controlcurrent flowing to the objective lens 103 having an excellentresponsiveness, the present invention is not limited thereto, and thestage 105 may be elevated and lowered. However, if the focus is adjustedby elevating and lowering the stage 105, then responsiveness isdeteriorated.

[0097] Further, the appearance inspection apparatus using an SEM imagewill be described with reference to FIGS. 4 to 9. FIG. 4 shows theappearance inspection apparatus using an SEM image according to anembodiment of the present invention. In this embodiment, an electronbeam 112 scans the inspected object 106 such as a wafer and electronsgenerated from the inspected object 106 are detected by the irradiationof electron beams. Then, an electronic beam image at the scanningportion is obtained on the basis of the change of intensity, and thepattern is inspected by using the electron beam image.

[0098] As the inspected object 106, there is the semiconductor wafer 3as shown in FIGS. 5(a)-5(c), for example. On this semiconductor wafer 3,there are arrayed a number of chips 3 a which form the same productfinally as shown in FIG. 5(a). An inside pattern layout of the chip 3 acomprises a memory mat portion 3 c in which memory cells are regularlyarranged at the same pitch in a two-dimensional fashion and a peripheralcircuit portion 3 b as shown by an enlarged view in FIG. 5(b). When thepresent invention is applied to the inspection of the pattern of thissemiconductor wafer 3, a detected image at a certain chip (e.g. chip 3d) is memorized in advance, and then compared with a detected image ofanother chip (e.g. 3 e) (hereinafter referred to as “chip comparison”).Alternatively, a detected image at a certain memory cell (e.g. memorycell 3 f) is memorized in advance, and then compared with a detectedimage of other cell (e.g. cell 3 g) (hereinafter referred to as “cellcomparison”) as shown in FIG. 5(c), thereby resulting in a defect beingrecognized.

[0099] If the repetitive patterns (chips or cells of the semiconductorwafer, by way of example) of the inspected object 106 are equal to eachother strictly and if equal detected images are obtained, then onlydefects cannot agree with each other when images are compared with eachother. Thus, it is possible to recognize a defect.

[0100] However, in actual practice, a disagreement between images existsin the normal portion. As a disagreement at the normal portion, thereare a disagreement caused by the inspected object, and a disagreementcaused by the image detection system. The disagreement caused by theinspected object is based on a subtle difference caused between therepetitive patterns by a wafer manufacturing process such as exposure,development or etching. This disagreement appears as a subtle differenceof pattern shape and a difference of gradation value. The disagreementcaused by the image detection system is based on a fluctuation of aquantity of illumination light, a vibration of stage, various electricalnoises, and a disagreement between detection positions of two images orthe like. These disagreements appear as a difference of gradation valueof a partial image, a distortion of pattern, and a positionaldisplacement of an image on the detected image.

[0101] In the embodiment according to the present invention, a detectionimage (first two-dimensional image) in which gradation values ofcoordinates (x, y) aligned at the pixel unit are f1(x, y) and a comparedimage (second two-dimensional image) in which gradation values ofcoordinates (x, y) are g1(x, y) are compared with each other, athreshold value (allowance value) used when a defect is determined isset at every pixel considering the positional displacement of patternand a difference between the gradation values, and a defect isdetermined on the basis of a threshold value (allowance value set atevery pixel.

[0102] A pattern inspection system according to the present inventioncomprises, as shown in FIGS. 4 and 7, a detection unit 115, an imageoutput unit 140, an image processing unit 124 and an entirety controlunit 120 for controlling the entire system. Incidentally, the presentpattern inspection system includes an inspection chamber 100 whoseinside is vacated and exhausted by vacuum and a reserve chamber (notshown) for inserting and ejecting the inspected object 106 into and fromthe inspection chamber 100. This reserve chamber can be vacated andexhausted by vacuum independently of the inspection chamber 100.

[0103] Initially, the inspection unit 115 will be described withreference to FIGS. 4 and 7. Specifically, the inside of the inspectionchamber 100 in the detection unit 115 generally comprises, as shown inFIG. 7, an electron optical system 116, an electron detection unit 117,a sample chamber 119, and an optical microscope unit 118. The electronoptical system 116 comprises an electron gun 31 (101), an electron beamderiving electrode 11, a condenser lens 32, a blanking deflector 13, ascanning deflector 34 (102), an iris 14, an objective lens 33 (103), areflecting plate 17, an ExB deflector 15, and a Faraday cup (not shown)for detecting a beam current. The reflecting plate 17 is shaped as acircular cone in order to achieve a secondary electron amplificationeffect.

[0104] Of the electron detection unit 117, the electron detector 35(104) for detecting electrons such as secondary electrons or reflectionelectrons is installed above the objective lens 33 (103), for example,within the inspection chamber 100. An output signal from the electrondetector 35 is amplified by an amplifier 36 installed outside theinspection chamber 100.

[0105] The sample chamber 119 comprises a sample holder 30, an X stage31 and a Y stage 32 previously referred to as stage 105, a positionmonitoring length measuring device 107 and a height measuring apparatus200 such as an inspected based plate height measuring device.Incidentally, there may be provided a rotary stage on the stage.

[0106] The position monitoring length measuring device 107 monitors aposition such as the stages 31, 32 (stage 105), and transfers amonitored result to the entirety control unit 120. The driving systemsof the stages 31, 32 also are controlled by the entirety control unit120. As a result, the entirety control unit 120 is able to preciselyunderstand the area and the position irradiated with electron beams 112on the basis of such data.

[0107] The inspected base plate height measuring device is adapted tomeasure the height of the inspected object 106 resting on the stages 31,32. Then, a focal length of the objective lens 33 (103) for convergingthe electron beam 112 is dynamically corrected on the basis of measureddata measured by the inspected base plate height measuring device 200 sothat electron beams can be irradiated under the condition that electronbeams are constantly properly-focused on the inspected area.Incidentally, in FIG. 7, although the height measuring apparatus 200 isinstalled within the inspection chamber 100, the present invention isnot limited thereto, and there may used a system in which the heightmeasuring device is installed outside the inspection chamber 100 andlight is projected into the inside of the inspection chamber 100 througha glass window or the like.

[0108] The optical microscope unit 118 is located at the position nearthe electron optical system 116 within the room of the inspectionchamber 100 and which position is distant to the extent that the opticalmicroscope unit and the electron optical system cannot affect eachother. A distance between the electron optical system 116 and theoptical microscope unit 118 should naturally be a known value. Then, theX stage 31 or the Y stage 32 is reciprocally moved between the electronoptical system 116 and the optical microscope unit 118. The opticalmicroscope unit 118 comprises a light source 61, an optical lens 62, anda CCD camera 63. The optical microscope unit 118 detects the inspectedobject 106, e.g. an optical image of a circuit pattern formed on thesemiconductor wafer 3, calculates a rotation displacement amount ofcircuit patterns based on the optical image thus detected, and transmitsthe rotation displacement amount thus calculated to the entirety controlunit 120. Then, the entirety control unit 120 becomes able to correctthis rotation displacement amount by rotating a rotating stage forming apart of stage 2 (105) which includes stages 31 and 32, for example.Also, the entirety control unit 120 sends this rotation displacementamount to a correction control circuit 120′, and the correction controlcircuit 120′ becomes able to correct the rotation displacement bycorrecting the scanning deflection position of electron beams caused bythe scanning deflector 34, for example, on the basis of this rotationdisplacement amount. Moreover, the optical microscope unit 118 detectsthe inspected object 106, e.g. the optical image of the circuit patternformed on the semiconductor wafer 3, observes this optical image, forexample, displayed on the monitor 50, and sets the inspection area onthe entirety control unit 120 by entering the coordinates of theinspection area into the entirety control unit 120 by using an inputbased on the optical image thus observed. Furthermore, the pitch betweenthe chips on the circuit pattern formed on the semiconductor wafer 3,for example, or the repetitive pitch of the repetitive pattern such asthe memory cell can be measured in advance and can be inputted to theentirety control unit 120. Incidentally, while the optical microscopeunit 118 is located within the inspection chamber 100 in FIG. 7, thepresent invention is not limited thereto, and the optical microscopeunit may be located outside the inspection chamber 100 to thereby detectthe optical image of the semiconductor wafer 3 through a glass window orthe like.

[0109] As shown in FIGS. 4 and 7, the electron beam emitted from theelectron gun 31 (101) travels through the condenser lens 32 and theobjective lens 33 (103) and is converged to a beam diameter of aboutpixel size on the sample surface. In that case, a negative potential isapplied to the sample by the ground electrode 38 (118) and the retardingelectrode 37 and the electron beam between the objective lens 33 (103)and the inspected object (sample) 106 is decelerated, whereby aresolution can be improved in a low acceleration voltage area. Whenirradiated with electron beams, the inspected object (wafer 3) 106generates electrons. The scanning deflector 34 (102) scans repeatedlyelectron beams in the X direction and electrons generated from theinspected object 106 in synchronism with the continuous movement of theinspected object (sample) 106 in the X direction by the stage 2 (105)are detected, thereby obtaining a two-dimensional electron beam image ofthe inspected object. The electrons generated from the inspected objectare detected by the detector 35 (104), and amplified by the amplifier36. In order to make the high-speed scanning possible, an electrostaticdeflector of which deflection speed is high should preferably be used asthe deflector 34 (102) for repeatedly scanning electron beams in the Xdirection. Moreover, a thermal electric field radiation type electrongun should preferably be used as the electron gun 31 (101) because itcan reduce the irradiation time by increasing the electron beam current.Further, a semiconductor detector which can be driven at a high speedshould preferably be used as the detector 35 (104).

[0110] Next, the image output unit 140 will be described with referenceto FIGS. 4, 7, and 8. Specifically, an electron detection signaldetected by the electron detector 35 (104) in the electron detectionunit 117 is amplified by the amplifier 36, and then converted by the A/Dconverter 39 (122) into digital image data (gradation image data). Then,the output from the A/D converter 39 (122) is transmitted by an opticalconverter (light-emitting element) 23, a transmission device (opticalfiber cable) 24, and an electric converter (light-receiving device) 25.According to this arrangement, the transmission device 24 may have thesame transmission speed as the clock frequency of the A/D converter 39(122). The output from the A/D converter 39 is converted by the opticalconverter (light-emitting element) 23 into an optical digital signal,optically transmitted by the transmission device (optical fiber cable)24 and then converted by the electric converter (light-receiver) 25 intodigital image data (gradation image data). The reason that the outputsignal is converted into the optical signal and then transmitted isthat, in order to supply electrons 52 from the reflection plate 17 intothe semiconductor detector 35 (104), constituents (semiconductordetector 35, amplifier 36, A/D converter 39, and optical converter(light-emitting element) 23 from the semiconductor detector 35 to theoptical converter 23 should be floated at a positive high potential by ahigh-voltage power supply source (not shown). More precisely, only thesemiconductor detector 35 need be floated to the positive highpotential. However, the amplifier 36 and the A/D converter 39 shouldpreferably be located near the semiconductor detector in order toprevent noise from being mixed and a signal from being deteriorated. Itis difficult to maintain only the semiconductor detector 35 at thepositive high voltage, and hence all of the above-mentioned constituentsshould be held at the high voltage. Specifically, since the transmissiondevice (optical fiber cable) 24 is made of a high insulating material,after the image signal which is held at the positive high potentiallevel in the optical converter (light-emitting element) 23 is passedthrough the transmission device (optical fiber cable) 24, the electricconverter (light-receiver) 25 outputs an image signal of earth level.

[0111] The pre-processing circuit (image correcting circuit) 40comprises, as shown in FIG. 8, a dark level correcting circuit 72, anelectron beam source fluctuation correcting circuit 73, a shadingcorrecting circuit 74 and the like. Digital image data (gradation imagedata) 71 obtained from the electric converter (light-receiving element)25 is supplied to the pre-processing circuit (image correcting circuit)40, in which it is image-corrected such as a dark level correction, anelectron beam source fluctuation correction or a shading correction. Inthe dark level correction in the dark level correcting circuit 72, asshown in FIG. 9, a dark level is corrected on the basis of a detectionsignal 71 in a beam blanking period extracted based on a scanning linesynchronizing signal 75 obtained from the entirety control unit 120.Specifically, the reference signal for correcting the dark level sets anaverage of a gradation value of a specific number of pixels in aparticular position during the beam blanking period to the dark level,and updates the dark level at every scanning line. As described above,in the dark level correcting circuit 72, the detection signal detectedduring the beam blanking period is dark-level-corrected to the referencesignal which is updated at every line. When the electron beam sourcefluctuation is corrected by the electron beam source fluctuationcorrecting circuit 73, as shown in FIG. 9, a detection signal 76 ofwhich the dark level is corrected is normalized by a beam current 77monitored by the Faraday cup (not shown) which detects theabove-mentioned beam current at a correction cycle (e.g. line unit of100 kHz). Since the fluctuation of the electron beam source is notrapid, it is possible to use a beam current that was detected one toseveral lines before. When a shading is corrected by the shadingcorrecting circuit 74, as shown in FIG. 9, the fluctuation of thequantity of light caused in a detection signal 78 in which the electronbeam source fluctuation was corrected at the beam scanning position 79obtained from the entirety control unit 120 is corrected. Specifically,the shading correction executes the correction (normalization) at everypixel on the basis of reference brightness data 83 which is previouslydetected. The shading correction reference data 83 is previouslydetected, the detected image data is temporarily stored in an imagememory, the image data thus stored is transmitted to a computer disposedwithin the entirety control unit 120 or a high-order computer connectedto the entirety control unit 120 through a network, and processed bysoftware in the computer disposed within the entirety control unit 120or the high-order computer connected through the network to the entiretycontrol unit 120, thereby resulting in the shading correction referencedata being created. Moreover, the shading correction reference data 83is calculated in advance and held by the high-order computer connectedto the entirety control unit 120 through the network. When theinspection is started, the data is downloaded, and this downloaded datamay be latched in a CPU in the shading correcting circuit 74. To copewith a full visual field width, the shading correcting circuit 74includes two correction memories having pixel number (e.g. 1024 pixels)of an amplitude of an ordinary electron beam, and the memories areswitched during a time (time from the end of one visual field inspectionto the start of the next one visual field inspection) outside theinspection area. The correction data may have pixel number (e.g. 5000pixels) of a maximum amplitude of an electron beam, and the CPU mayrewritten such data in each correction memory till the end of the nextone visual field inspection.

[0112] As described above, after the dark level correction (dark levelis corrected on the basis of the detection signal 71 during the beamblanking period), the electron beam current fluctuation correction (beamcurrent intensity is monitored and a signal is normalized by a beamcurrent) and the shading correction (fluctuation of quantity of light atthe beam scanning position is corrected) are effected on the digitalimage data (gradation image data) 71 obtained from the electricconverter (light-receiving element) 25, the filtering processing iseffected on the corrected digital image data (gradation image data) 80by a Gaussian filter, a mean value filter or an edge-emphasizing filterin the filtering processing circuit 81, thereby resulting a digitalimage signal 82 with an image quality being improved. If necessary, adistortion of an image is corrected. These pre-processings are executedin order to convert a detected image so as to become advantageous in thelater defect judgment processing.

[0113] Although the delay circuit 41 formed of a shift register or thelike delays the digital image signal 82 (gradation image signal) with animproved image quality from the pre-processing circuit 40 by a constanttime, if a delay time is obtained from the entirety control unit 120 andset to a time during which the stage 2 is moved by a chip pitch amount(d1 in FIG. 5(a)), then a delayed signal g0 and a signal f0 which is notdelayed become image signals obtained at the same position of theadjacent chips, thereby resulting in the aforementioned chip comparisoninspection being realized. Alternatively, if the delay time is obtainedfrom the entirety control unit 120 and set to a time during which thestage 2 is moved by a pitch amount (d2 in FIG. 5(c)) of the memory cell,then the delayed signal g0 and the signal f0 which is not delayed becomeimage signals obtained at the same position of the adjacent memorycells, thereby resulting in the aforementioned cell comparisoninspection being realized. As described above, the delay circuit 41 isable to select an arbitrary delay time by controlling a read-out pixelposition based on information obtained from the entirety control unit120. As described above, compared digital image signals (gradation imagesignals) f0 and g0 are outputted from the image output unit 140.Hereinafter, f0 will be referred to as a detection image and g0 will bereferred to as a comparison image. Incidentally, as shown in FIG. 7, thecomparison image signal f0 may be stored in a first image memory unit 46composed of a shift register and an image memory and the detection imagesignal f0 may be stored in a second image memory unit 47 composed of ashift register and an image memory. As described above, the first imagememory unit 46 may comprise the delay circuit 41, and the second imagememory unit 47 is not necessarily required.

[0114] Moreover, an electron beam image latched within the preprocessingcircuit 40 and the second image memory unit 47 or the like or theoptical image detected by the optical microscope unit 118 may bedisplayed on the monitor and can be observed.

[0115] The image processing unit 124 will be described with reference toFIG. 4. The pre-processing circuit 40 outputs a detection image f0(x, y)expressed by a gradation value (light and shade value) with respect to acertain inspection area on the inspected object 106, and the delaycircuit 41 outputs a comparison image (standard image : reference image)g0(x, y) expressed by a gradation value (light and shade value) withrespect to a certain area on the inspected object 106 which becomes astandard to be compared.

[0116] The pixel unit position alignment unit 42 of image processingunit 124 displaces the position of comparison image, for example, insuch a manner that the position displacement amount of the comparisonimage g0(x, y) relative to the above-mentioned detection image f0(x, y)falls in a range of from 0 to 1 pixel, in other words, the position atwhich a “matching degree” between f0(x, y) and g0(x, y) becomes maximumfalls within a range of from 0 to 1 pixel. As a consequence, as shown inFIGS. 6(a) and 6(b), for example, the detection image f0(x, y) and thecomparison image g0(x, y) are aligned with an alignment accuracy of lessthan one pixel. A square portion shown by dotted lines in FIG. 6 denotesa pixel. This pixel is a unit detected by the electron detector 35,sampled by the A/D converter 39 (122), and converted into a digitalvalue (gradation value:light and shade value). That is, the pixel unitdenotes a minimum unit detected by the electron detector 35.Incidentally, as the above-mentioned “matching degree”, there may beconsidered the following equation (expression 1):

max |f 0−g 0|, ΣΣ|f 0−g 0|, ΣΣ (f 0−g 0) 2  (espression 1)

[0117] max |f)−g0| shows a maximum value of an absolute value of adifference between the detection image f0(x, y) and the comparison imageg0(x, y). ΣΣ|f0−g0| shows a total of absolute value of a differencebetween the detection image f0(x, y) and the comparison image g0(x, y)within the image. ZZ (f0−g0) shows a value which results from squaring adifference between the detection image f0(x, y) and the comparison imageg0(x, y) and integrating the squared result in the x direction and the ydirection.

[0118] Although the processed content is changed depending upon theadoption of any one of the above-mentioned (expression 1), the case thatΣΣ|f0−g0| is adopted will be described below.

[0119] Mx assumes the displacement amount of the comparison image g0(x,y) in the x direction, and my assumes the displacement in the ydirection (mx, my are integers). Then, e1(mx, my) and sl(mx, my) aredefined by equations of (expression 2) and (expression 3), respectively:

e 1(mx, my)=ΣΣ|f 0(x, y)−g 0(x+mx, y+my)  (expression 2)

s 1(mx, my)=e 1(mx, my)+e 1(mx+1, my)+e 1(mx, my+1)+e 1(mx+1,my+1)  (expression 3)

[0120] In the expression 2, ΣΣ shows a total within the image. Sincewhat is required to calculate is a value obtained when mx assumes thedisplacement amount of the x direction in which s1(mx, my) becomesminimum and a value obtained when my assumes the displacement amount ofthe y direction, by changing mx and my as ±0, 1, 2, 3, 4, . . . n, inother words, by changing the comparison image g0(x, y) with a pixelpitch, there is calculated s1(mx, my) of each time. Then, a value mx0 ofmx in which the calculated value becomes minimum and a value my0 of myin which the calculated value becomes minimum are calculated.Incidentally, the maximum displacement amount n of the comparison imageshould be increased as the positional accuracy is lowered in response tothe positional accuracy of the detection unit 115. The pixel unitposition alignment unit 42 outputs the detection image f0(x, y) at itis, and outputs the comparison image g0(x, y) with a displacement of(mx0, my0). That is, f1(x, y)=f0(x, y), g1(x, y)=g0(x+mx0, y+my0).

[0121] A positional displacement detection unit (not shown) fordetecting a positional displacement of less than a pixel divides theimages f1(x, y), g(x, y) aligned at the pixel unit into small areas(e.g. partial images composed of 128 * 256 pixels), and calculatespositional displacement amounts (positional displacement amounts becomereal number of 0 to 1) of less than the pixel at every divided area(partial image). The reason that the images are divided into small areasis in order to cope with a distortion of an image, and hence should beset to a small area to the extent that a distortion can be neglected. Asa measure for measuring a matching degree, there are the selectionbranches shown in the expression 1. An example is shown in which thethird “sum of squares of difference” (ΣΣ (f0−g0)2) is adopted.

[0122] Let it be assumed that an intermediate position between f1(x, y)and g1(x, y) is held at the positional displacement amount 0 and that,as shown in FIG. 6, f1 is displaced y −δx in the x direction, f1 isdisplaced by −δy in the by direction, g1 is displaced by +δx in the xdirection, and that g1 is displaced by +δy in the y direction. That is,the displacement amounts of f1 and g1 are 2*δx in the x direction and2*δy in the y direction. Since δx, δy are not integers, in order todisplace f1 and g1 by δx, δy, it is necessary to define a value betweenthe pixels. An image f2 in which f1 is displaced by +δx in the xdirection and by +δy in the y direction and an image g2 in which g1 isdisplaced by −δx in the x direction and by −δy in the y direction aredefined as the following equations of (expression 4) and (expression 5):

f 2(x, y)=f 1(x+δx, y+δy)=f 1(x ,y)+δx(f 1(x+1, y)−f 1(x, y))+δy(f 1(x,y+1)−f 1(x, y))  (expression 4)

g 2(x, y)=g 1(x−δx, y−δy)=g 1(x, y)+δx(g 1(x−1, y)−g 1(x, y))+δy(g 1(x,y−1)−g 1(x, y))  (expression 5)

[0123] The expression 4 and the expression 5 are what might be calledlinear interpolations. A matching degree e2(δx, δy) of f2 and g2 isrepresented by the following equation of (expression 6) if “sum ofsquares of difference” is adopted.

e 2(δx, δy)=ΣΣ(f 2(x, y)−g 2(x, y))2  (expression 6)

[0124] ΣΣ denotes a total within small areas (partial images). Theobject of the positional displacement detection unit (not shown) fordetecting a positional displacement of less than the pixel unit is toobtain a value δx0 of δx and a value δy0 of δy in which e2(δx, δy) takesthe minimum value. To this end, an equation which results from partiallydifferentiating the above-mentioned expression 6 by δx, δy is set to 0and may be solved. The results are obtained as shown by the followingequations of (expression 7) and (expression 8):

δx={(ΣΣC 0*cy)*(ΣΣCx*Cy) ΣΣC 0*Cx)*(Σ93Cy*Cy)}/{(ΣΣCx*Cx)*(ΣΣCy*Cy)−(ΣΣCx*Cy)*(ΣΣCx*Cy)}  (expression 7)

δx={(ΣΣC 0*cx)*(ΣΣCx*Cy)ΣΣC 0*cy)*(ΣΣCx*Cx)}/{(Σ93Cx*Cx)*(ΣΣCy*Cy)−(ΣΣCx*Cy)*(ΣΣCx*Cy)}  (expression 8)

[0125] However, respective ones of C0, Cx, Cy establish relationshipsshown by the following equations of (expression 9), (expression 10) and(expression 11):

C 0=f 1(x, y)−g 1(x, y)  (expression 9)

Cx={f 1(x+1, y)−f 1(x, y)}−{g 1(x−1, y)−g 1(x, y)  (expression 10)

Cy={f 1(x, y+1)−f 1(x, y)}−{g 1(x, y−1)−g 1(x, y)}  (expression 11)

[0126] In order to obtain δx0, δy0, respectively, as shown by the(expression 7) and the (expression 8), it is necessary to obtain avariety of statistic amounts ΣΣCk*Ck (Ck=C0, Cx, Cy). The statisticamount calculating unit 44 calculates a variety of statistic amountΣΣCk*Ck on the basis of the detection image f1(x, y) composed of thegradation value (light and shade value) aligned at the pixel unitobtained from the pixel unit position alignment unit 42 and thecomparison image g1(x, y).

[0127] The sub-CPU 45 obtains δx0, δy0 by calculating the (expression 7)and the (expression 8) by using the ΣΣCk*Ck which was calculated in thestatistic amount calculating unit 44.

[0128] The delay circuits 46, 47 formed of the shift register or thelike are adapted to delay the image signals f1 and g1 by the time whichis required by the less than pixel positional displacement unit (notshown) to calculate δx0, δy0.

[0129] The difference image extracting circuit (difference extractingcircuit : distance extracting unit) 49 is adapted to obtain a differenceimage (distance image) sub(x, y) between f1 and g1 having positionaldisplacements 2*δx0, 2*δy0 from a calculation standpoint. Thisdifference image (distance image) sub(x, y) is expressed by the equationof (expression 12) as follows:

sub(x, y)=g 1(x, y)−f 1(x, y)  (expression 12)

[0130] The threshold value computing circuit (allowance range computingunit) 48 is adapted to calculate by using the image signals f1, g1 fromthe delay circuits 46, 47 and the positional displacement amounts δx0,δy0 of less than the pixel obtained from the less than pixel positionaldisplacement detection unit (not shown) two threshold values (allowancevalues indicative of allowance ranges) thH(x, y) and thL(x, y) which areused by the defect deciding circuit (defect judgment unit) 50 todetermine in response to the value of the difference image (distanceimage) sub(x, y) obtained from the difference image extracting circuit(difference extracting circuit : distance extracting unit) 49 whether ornot the inspected object is the nominated defect. ThH(x, y) is thethreshold value (allowance value indicative of allowance range) whichdetermines the upper limit of the difference image (distance image)sub(x, y), and thL(x, y) is the threshold value (allowance valueindicative of allowance range) which determines the lower limit of thedifference image (distance image) sub(x, y). Contents of the computationin the threshold value computing circuit 48 are expressed by theequations of (expression 13) and (expression 14) as follows:

thH(x, y)=A(x, y)+B(x, y)+C(x, y)  (expression 13)

thL(x, y)=A(x, y)−B(x, y)−C(x, y)  (expression 14)

[0131] However, A(x, y) is a term expressed by a relationship of thefollowing equation of (expression 16) and which is used to correct thethreshold values by using the less than pixel positional displacementamounts δx0, δy0 in response to the value of the difference image(distance image) sub(x, y) substantially.

[0132] Also, B(x, y) is a term expressed by a relationship of theequation of the (expression 16) and which is used to allow a very smallpositional displacement of a pattern edge (very small difference ofpattern shape, pattern distortion also returns to a very smallpositional displacement of pattern edge from a local standpoint) betweenthe detection image f1 and the comparison image g1.

[0133] Also, C(x, y) is a term expressed by a relationship of theequation of (expression 17) and which is used to allow a very smalldifference of gradation value (light and shade value) between thedetection image f1 and the comparison image g1).

A(x, y)={dx 1(x, y)*δx 0−dx 2(x, y)*(−δx 0)}+{dy 1(x, y)*δy 0−dy 2(x,y)*(−δy 0)}={dx 1(x, y)+dx 2(x, y)}*δx 0+{dy 1(x, y)+dy 2(x, y)}*δy0  (expression 15)

B(x, y)=|{dx 1(x, y)*α−dx 2(x, y)*(−α)}|+|{dy 1(x, y)*β−dy 2(x,y)*(−β)}|=|{dx 1(x, y)+dx 2(x, y)}*α|+|{dy 1(x, y)+dy 2(x, y)}*β|  (expression 16)

C(x, y)=((max 1+max 2)/2)*γ+ε  (expression 17)

[0134] where α, β are the real numbers ranging from 0 to 0.5, γ is thereal number greater than 0, and ε is the integer greater than 0.

[0135] dx1(x, y) is expressed by a relationship of the equation of(expression 18), and indicates a changed amount of a gradation value(light and shade value) with respect to the x direction +1 adjacentimage in the detection image f1(x, y).

[0136] dy2(x, y) is expressed by a relationship of the equation of(expression 19), and indicates a changed amount of a gradation value(light and shade value) with respect to the x direction −1 adjacentimage in the comparison image g1(x, y).

[0137] dy1(x, y) is expressed by a relationship of the equation of(expression 20), and indicates a changed amount of a gradation value(light and shade value) with respect to the y direction +1 adjacentimage in the detection image f1(x, y).

[0138] dy2(x, y) is expressed by a relationship of the equation of(expression 21), and indicates a changed amount of a gradation value(light and shade value) with respect to the y direction −1 adjacentimage in the comparison image g1(x, y).

dx 1(x, y)=f 1(x+1, y)−f 1(x, y)  (expression 18)

dx 2(x, y)=g 1(x, y)−g 1(x−1, y)  (expression 19)

dy 1(x, y)=f 1(x, y+1)−f 1(x, y)  (expression 20)

dy 2(x, y)=g 1(x, y)−g 1(x, y−1)  (expression 21)

[0139] max1 is expressed by a relationship of the equation of(expression 22), and indicates maximum gradation values (light and shadevalues) of x direction +1 adjacent image and y direction +1 adjacentimage including itself in the detection image f1(x, y).

[0140] max2 is expressed by a relationship of the equation of(expression 23), and indicates maximum gradation values (light and shadevalues) of x direction −1 adjacent image and y direction—adjacent imageincluding itself in the comparison image g1(x, y).

max 1=max{f 1(x, y), f 1(x+1, y), f 1(x, y+1), f(x+1, y+1)}  (expression22)

max 2=max{g 1(x, y), g 1(x−1, y), g 1(x, y−1), g(x−1, y−1)}  (expression23)

[0141] First, the first term A(x, y) in the equations of (expression 13)and (expression 14) for calculating the threshold values thH(x, y),thL(x, y) will be described. Specifically, the first term A(x, y) in theequations of (expression 13) and (expression 14) for calculating thethreshold values thH(x, y) and thL(x, y) is the term used to correct thethreshold values in response to the less than pixel positionaldisplacement amounts δx0, δy0 which were calculated by the positionaldisplacement detection unit 43. Since dx1 expressed by (expression 18),for example, is a local changing rate of a gradation value of f1 in thex direction, dx1(x, y)*δx0 expressed by (expression 15) can be regardedas a predicted value of the change of the gradation value (light andshade value) of f1 obtained when the position is shifted by δx0.Therefore, the first term {dx1(x, y)*δx0−dx2(x, y)*(−δx0)} can beregarded as a value which predict at every pixel a changing rate of agradation value (light and shade value) of the difference image(distance image) of f1 and g1 obtained when the position of f1 isdisplaced by δx0 in the x direction and the position of g1 is displacedby −δx0 in the x direction. Similarly, the second term can be regardedas the value which predicts a changing rate with respect to the ydirection. Specifically, {dx1(x, y)+dx2(x, y)}*δx0 is a value which canpredict a changing rate of a gradation value (light and shade value ofdifference image (distance image) of f1 and g1 in the x direction bymultiplying a local changing rate {dx1(x, y)+dx2(x, y)} of thedifference image (distance image) between the detection image f1 and thecomparison image g1 in the x direction with the positional displacementδx0. Also, {dy1(x, y)+dy2(x, y)}*δy0 is a value which predicts at everypixel a changing rate of a gradation value (light and shade value) ofthe difference image (distance image) of f1 and g1 by multiplying alocal changing rate {dy1(x, y)+dy2(x, y) of the difference image(distance image) between the detection image f1 and the comparison imageg1 in the y direction with the positional displacement δy0.

[0142] As described above, the first term A)x, y) in the thresholdvalues thh(x, y) and thL(x, y) is the term used to cancel the knownpositional displacements δx0, δy0.

[0143] The second term B(x, y) in the equations of (expression 13) and(expression 14) for calculating the threshold values thH(x, y) andthL(x, y) will be described. Specifically, the second term B(x, y) inthe equations of (expression 13) and (expression 14) for calculating thethreshold values thH(x, y) and thL(x, y) is the term used to allow avery small positional displacement of pattern edge (very smalldifference of pattern shape and pattern distortion also are returned tovery small positional displacements of pattern edge from a localstandpoint) As will be clear from the comparison of the (expression 15)for calculating A(x, y) and the (expression 16) for calculating B(x, y),B(x, y) is an absolute value of a change prediction of a gradation value(light and shade value) of the difference image (distance image) broughtabout by the positional displacements α, β. If the positionaldisplacement is canceled by A(x, y), then the addition of B(x, y) toA(x, y) means that the position aligned state is further displaced by αin the x direction and by β in the y direction considering a very smallpositional displacement of pattern edge caused by a very smalldifference based on the pattern shape and the pattern distortion. Thatis, +B(x, y) expressed by the equation of (expression 13) is to allowthe positional displacement of +α in the x direction and the positionaldisplacement of +β in the y direction as the very small positionaldisplacements of the pattern edge caused by the very small differencesbased on the pattern shape and the pattern distortion. Further, thesubtraction of B(x, y) from A(x, y) in the equation of (expression 14)means that the positional aligned state is positionally displaced by −αin the x direction and by −β in the y direction. −B(x, y) expressed bythe equation of (expression 14) is adapted to allow the positionaldisplacement of −α in the x direction and −β in the y direction. Asshown by the equations of (expression 13) and (expression 14), if thethreshold value includes the upper limit thH(x, y) and the lower limitthL(x, y), then it is possible to allow the positional displacements of±α, ±β. Then, if the threshold value computing circuit 48 sets thevalues of the inputted parameters α, β to proper values, then it becomespossible to freely control the allowable positional displacement amounts(very small positional displacement amounts of pattern edge) caused bythe very small difference based on the pattern shape and the patterndistortion.

[0144] Next, the third term C(x, y) in the equations of (expression 13)and (expression 14) for calculating the threshold values thH(x, y) andthL(x, y) will be described. The third term C(x, y) in the equations of(expression 13) and (expression 14) for calculating the threshold valuesthH(x, y) and thL(x, y) is a term used to allow a very small differenceof a gradation value (light and shade value) between the detection imagef1 and the comparison image g1. As shown by the equation of (expression13), the addition of C(x, y) means that the gradation value (light andshade value) of the comparison image g1 is larger than the gradationvalue (light and shade value) of the detection image f1 by C(x, y). Asshown by the equation of (expression 14), the subtraction of C(x, y)means that the gradation value (light and shade value) of the comparisonvalue g1 is smaller than the gradation value (light and shade value) ofthe detection image by C(x, y). While C(x, y) is a sum of a value whichresults from multiplying a representing value (max value) of a gradationvalue at the local area with the proportional constant γ and theconstant ε as shown by the equation of (expression 17), the presentinvention is not limited to the above-mentioned function. If the mannerin which the gradation value is fluctuated is already known, then it ispossible to use a function which can cope with such manner. For example,if it is clear that a fluctuation width is proportional to a square rootof a gradation value, then the equation of (expression 17) should bereplaced with C(x, y)=(square root of (max1+max2))*γ+ε. Thus, thethreshold value computing circuit 48 becomes able to freely control adifference of allowable gradation value (light and shade value) by theinputted parameters γ, ε similarly to B(x, y).

[0145] Specifically, the threshold value computing circuit (allowablerange computing unit) 48 includes a computing circuit for computing{dx1(x, y)+dx2(x, y)} by the equations of (expression 18) and(expression 19) based on the detection image f1(x, y) composed of agradation value (light and shade value) inputted from the delay circuit46 and the comparison image g1(x, y) composed of a gradation value(light and shade value) inputted from the delay circuit 47, a computingcircuit for computing {dy1(x, y)+dy2(x, y)} by the equations of(expression 20) and (expression 21) and a computing circuit forcomputing (max1+max2) by the equations of (expression 22) and(expression 23). Further, the threshold value computing circuit 48includes a computing circuit for computing ({dx1(x, y)+dx2(x,y)}*δx0±|{dx1(x, y)+dx2(x, y)}|*α) which is a part of (expression 15)and a part of (expression 16) on the basis of {dx1(x, y)+dx2(x, y)}obtained from the computing circuit, δx0 obtained from the less thanpixel displacement detection unit 43 and the inputted a parameter, acomputing circuit for computing (dy1(x, y)+dy2(x, y))*δy0±|{dy1(x,y)+dy2(x, y)}|*β) which is a part of (expression 15) and a part of(expression 16) on the basis of {dy1(x, y)+dy2(x, y)} obtained from thecomputing circuit, δy0 obtained from the less than pixel displacementdetection unit 43 and the inputted β parameter and a computing circuitfor computing ((max1+max2)/2)*γ+ε) in accordance with the equation of(expression 17), for example, on the basis of (max1+max2) obtained fromthe computing circuit and the inputted γ, ε parameters. Further, thethreshold value computing circuit 48 includes an adding circuit forpositively adding ({dx1(x, y)+dx2(x, y)}*δx0+|{dx1(x, y)+dx2(x, y)}|*α),({dy1(x, y)+dy2(x, y)}*δy0+|{dy1(x, y)+dy2(x, y)}|*β) obtained from thecomputing circuit and ((max1+max2)/2)*γ+ε) obtained from the computingcircuit to output the threshold value thH(x, y) of the upper limit, asubtracting circuit for negatively computing (((max1+max2)/2)*γ+ε)obtained from the computing circuit and an adding circuit for positivelycomputing ({dx1(x, y)+dx2(x, y)}*δx)−|{dx1(x, y)+dx2(x, y)|*α} obtainedfrom the computing circuit, ({dy1(x, y)+dy2(x, y)}*δy0−|{dy1(x,y)+dy2(x, y)}|*β) obtained from the computing circuit and−((max1+max2)/2*γ+ε) obtained from the subtracting circuit to output thethreshold value thL(x, y) of the lower limit.

[0146] Incidentally, the threshold value computing circuit 48 may berealized by a CPU by software processing. Further, the parameters α, β,γ, ε inputted to the threshold value computing circuit 48 may be enteredby an input means (e.g. keyboard, recording medium, network or the like)disposed in the entirety control unit 120.

[0147] The defect deciding circuit (defect judgment unit ) 50 decides byusing the difference image (distance image) sub(x, y) obtained from thedifference image extracting circuit (difference extracting circuit) 49,the threshold value of the lower limit (allowable value indicating theallowable range of lower limit) thL(x, y) obtained from the thresholdvalue computing circuit 48 and the threshold value of the upper limit(allowable value indicating the allowable range of upper limit) thH(x,y) that the pixel at the position (x, y) is a non-defect nominated pixelof the following equation of (expression 24) is satisfied and that thepixel at the position (x, y) is a defect nominated pixel if it is notsatisfied. The defect deciding circuit 50 outputs def(x, y) which takesa value of 0, for example, with respect to the non-defect nominatedpixel and which takes a value greater than 1, for example, thedefect-nominated pixel indicating a disagreement amount.

thL(x, y)≦sub(x, y)≦thH(x, y)  (expression 24)

[0148] The feature extracting circuit 50 a executes a noise eliminationprocessing (e.g. contracts/expands def(x, y). When all of 3×3 pixels arenot simultaneously the defect-nominated pixels, the center pixel is setto 0 (non-defect nominated pixel), for example, and eliminated by acontraction processing, and is returned to the original one by anexpansion processing. After a noise-like output (e.g. all 3×3 pixels arenot simultaneously the defect-nominated pixels) is deleted, there isexecuted a defect-nominated pixel merge processing in which nearbydefect-nominated pixels are collected into one. Thereafter, barycentriccoordinates and XY projection lengths (maximum lengths in the xdirection and the y direction) are demonstrated at the above-mentionedunit. Incidentally, the feature extracting circuit 50 a calculates afeature amount 88 such as a square root of (square of X projectionlength+square of Y projection length) or an area, and outputs thecalculated result.

[0149] As described above, the image processing unit 124 controlled bythe entirety control unit 120 outputs the feature amount (e.g.barycentric coordinates, XY projection lengths, area, etc.) of thedefect-nominated portion in response to coordinates on the inspectedobject (sample) 106 which is detected with the irradiation of electronbeams by the electron detector 35 (104).

[0150] The entirety control unit 120 converts position coordinates ofthe defect-nominated portion on the detected image into the coordinatesystem on the inspected object (sample) 106, deletes a pseudo-defect,and finally forms defect data composed of the position on the inspectedobject (sample) 106 and the feature amount calculated from the featureextracting circuit 50 a of the image processing unit 124.

[0151] According to the embodiment of the present invention, since thewhole positional displacement of the small areas (partial images), thevery small positional displacements of individual pattern edges and thevery small differences of gradation values (light and shade values) areallowed, the normal portion can be prevented from being inadvertentlyrecognized as the defect. Moreover, by setting the parameters α, β, γ, εto proper values, it becomes possible to easily control the positionaldisplacement and the allowance amount of the fluctuation of thegradation values.

[0152] Further, according to the embodiment of the present invention,since an image which is position-aligned by the interpolation in apseudo-fashion, an image can be prevented from being affected by asmoothing effect which is unavoidable in the interpolation. There isthen the advantage that the present invention is advantageous indetecting a very small defect portion. In actual practice, according tothe experiments done by the inventors of the present invention, havingcompared the result in which the defect is decided by calculating thethreshold value allowing the positional displacement and the fluctuationof the gradation value similarly to this embodiment after an image whichis position-aligned by the interpolation in a pseudo-fashion by usingthe result of the positional displacement detection of less than pixeland the result obtained by the defect judgment according to thisembodiment, the defect detection efficiency can be improved by greaterthan 5% according to the embodiment of the present invention.

[0153] The arrangement for preventing the electron beam image in theaforementioned electron beam apparatus (observation SEM apparatus,length-measuring SEM apparatus) from being deteriorated will bedescribed further. Specifically, the quality of the electron beam imageis deteriorated by the image distortion caused by the deflection and theaberration of the electron optical system and by the resolution loweredby the de-focusing. The arrangement for preventing the image qualityfrom being deteriorated is comprised of the height detection apparatus200 composed of the height detection optical apparatus 200 a and theheight calculating unit 200 b, the focus control apparatus 109, thedeflection signal generating apparatus 108, and the entirety controlapparatus 120.

[0154]FIGS. 10 and 11(a)-11(b) show the height detection opticalapparatus 200 a according to a first embodiment of the presentinvention. Specifically, the height detection optical apparatus 200 aaccording to the present invention comprises an illumination opticalsystem formed of a light source 201, a mask 203 in which the samepattern irradiated with light from the light source 201, e.g. thepattern composed of repetitive (repeated) rectangular patterns, aprojection stop 211, a polarizing filter 240 for emitting S-polarizedlight and a projection lens 210 and which illuminates the multi-slitshaped pattern with the S-polarized light at an angle (θ=greater than 60degrees) vertically inclined from the sample surface 106 by an angle θand a detection optical system composed of a detection lens 215 forfocusing regularly-reflected light from the sample surface 106 on thelight-receiving surface of a line image sensor 214, a cylindrical lens213 and a detection lens 216 for converging the longitudinal directionof the multi-slit shaped pattern on the light-receiving pixels of theline image sensor 214 and the SILO line image sensor and which is usedto detect a height of the sample surface 106 from the shift amount ofthe multi-slit image detected by the line image sensor 214.

[0155] Light emitted from the light source 201 irradiates the mask 203on which there is drawn the multi-slit shaped pattern which results fromrepeating the rectangular-shaped pattern, for example. As a result, themulti-slit-shaped pattern is projected by the projection lens 210 ontothe height measuring position 217 on the sample surface 106. Themulti-slit-shaped pattern drawn on the mask 203 is not limited to theslit-shaped pattern, and may be shaped as any shape such as an ellipseor a square so long as it is formed by the repetition of the samepattern. Generally, it can be a pattern that comprises a row of patternswith different shapes. Moreover, the spacing between the neighboringpatterns can be different from each other. What is essential, as will bedescribed later in detail using FIG. 11, is that by averaging themultiple height estimations computed from the movements of the multiplepatterns, a more precise height estimation can be obtained. Therefore,hereinafter, the word “multi-slit-shaped pattern” or “luminous flux ofrepetitive light pattern” defines a pattern which comprises multiplearranged patterns with either different shapes or the same shape, whosespacing between the neighboring patterns are either different or thesame. The multi-slit-shaped pattern projected onto the sample surface106 is focused by the detection lens 215 on the line image sensor 214such as a CCD. Assuming that m is the 10O magnification of thisdetection optical system, then when the height of the sample surface 106is changed by z, the multi-slit image is shifted by 2z·sinθ·m on thewhole. By using this fact, it is possible to detect the height of thesample surface 106 from the shift amount of the multi-slit imageobtained based on the signal received by the line image sensor 214.

[0156] Reference numeral 110 denotes the optical axis of the upperobservation system, i.e. the height detection position. Specifically,when the above-mentioned height detection apparatus is used as an autofocus height sensor, reference numeral 110 becomes the optical axis ofthe upper observation system. Incidentally, assuming that p is the pitchof the multi-slit-shaped pattern of the projected image of theprojection lens 210, then the pitch of the pattern projected onto thesample surface 106 becomes p/cosθ, and the pitch of the pattern on theimage sensor 214 becomes pm. Also, assuming that m′ is the magnificationof the illumination projection system, then the pitch of the pattern onthe mask 203 becomes p/m′. That is, the pitch of the multi-slit-shapedpattern formed on the mask 203 becomes p/m′.

[0157] As shown in FIGS. 11(a), 11(b), when a height is detected on thesample 106 at its boundaries having different reflectances, an intensitydistribution of a signal detected on the line image sensor 214 isaffected by a reflectance distribution of a sample. However, if themulti-slit-shaped pattern is as thin as possible so long as a clearimage can be maintained within a height detection range, then it ispossible to suppress a detection error caused by a reflectancedistribution on the surface of the object. Because, the detection erroris caused as a center of gravity of a slit image is deviated due to areflectance distribution of a sample, and an absolute value of thisdeviation increases in proportion to the width of the slit. In theembodiment as shown in FIG. 11(b), the third slit from left is affectedby an influence of a fluctuation of a reflectance on the boundary of thesample, but the slit width is narrow so that the detection error issmall. Furthermore, it is possible to reduce a detection error caused bythe object and the detection fluctuation by averaging the heightdetected values of a plurality of slits.

[0158] Although the detection error decreases as the slit width isreduced, this has a limitation. Thus, even when the slit width isreduced over a certain limit, no slit is clearly focused on the imagesensor 214, and a contrast is lowered.

[0159] This has the following relationship.

[0160] Specifically, assuming that ±zmax is a target height detectionrange, then at that time, the multi-slit image on the image sensor 214is de-focused by ±2zmax·cosθ. On the other hand, assuming that p is thecycle of the multi-slit-shaped pattern on the projection side and thatNA is an NA (Numerical Aperture) of the detection lens 215, then thisfocal depth becomes ±a·0.61p/NA. That is, the condition that the slitcycle p satisfies (2zmax·cosθ)<(a·0.61p/NA) is the condition under whichthe multi-slit image can be constantly detected clearly. In the above, ais the constant determined by defining the focus depth such that itsamplitude is lowered. When the focus depth is defined under thecondition that the amplitude is lowered to ½, a is about 0.6.

[0161] In the embodiment shown in FIG. 10, the projection stop 211 isplaced at the front focus position of the projection lens 210, and thedetection stop 216 is located at the rear focus position of thedetection lens 215. It is for the purpose of eliminating fluctuations ofmagnifications caused when the sample 106 is elevated or lowered byplacing the projection lens 210 and the detection lens 215 to the sampleside tele-centric state. This embodiment shows the effect of making theshape and/or the spacing of the multi-slit-shaped pattern non-uniform.In order to enlarge the height detection range of the height detector200 in this invention, using as many slits as possible is effective. Byusing many slits, a slit that is projected onto the sample 106 close tothe optical axis of the upper observation system 110 is always foundeven if the height of the sample 106 changes greatly. However, in thiscase, when too many slits are used in the multi-slit-shaped pattern, theslits around the both ends can go outside the view area of the lens 210or 215 or the image sensor 214, making it impossible to identify eachslit, hence, making it impossible to estimate the movement (2 mZ sin θ)of each slit. As illustrated in FIGS. 41(a) and 41(b), by making thecenter spacing of the multi-slit larger or by making the center slitwider, it becomes possible to identify each slit as long as the centerspacing or the center slit is within the viewing area of the heightdetector 200. With this embodiment, the height detectable range becomeslarger. Many variations of the multi-slit-shaped pattern can be easilyanalogized in which the shape of each slit and/or the spacing betweenthe neighboring slits are made different in order to identify each slit.

[0162] Also, in the embodiment shown in FIG. 10, the polarizing filter240 is placed in front of the projection lens 210 to selectively projectS-polarized light. This can achieve an effect for suppressing apositional shift caused by a multi-path reflection in a transparent filmand an effect for suppressing a difference of reflectances between theareas.

[0163] As shown in FIG. 12, when the surface of the sample is coveredwith a transparent film such as an insulating film for light, thereoccurs a phenomenon that projected light causes a multi-path reflectionin the transparent film to thereby shift the position of projectedlight. Since S-polarized light is more easily shifted on the surface ofthe transparent film than P-polarized light, if the polarizing filter240 is inserted, then S-polarized light becomes difficult to cause amulti-path reflection. On the other hand, FIG. 13 shows a graph graphingreflectances of resist and silicon which are examples of transparentfilms. Rs represents a reflectance of S-polarized light, Rp represents areflectance of P-polarized light, and R represents a reflectance ofrandomly-polarized light. As described above, the S-polarized light hasa smaller difference of reflectances between the materials. Further, astudy of this graph reveals that the reflectance increases as theincident angle increases and that a difference between the materialsdecreases. Specifically, an error becomes difficult to occur at thepattern boundary. Therefore, the incident angle θ should preferably aslarge as possible. The incident angle should preferably become greaterthan 80° ideally, and it is preferable to use an incident angle of atleast greater than 60°. Incidentally, the position of the polarizingfilter 240 is not limited to the front of the projection lens 210, andmay be interposed at any position between the light source 201 and thedetector 214 with substantially similar effects being achieved. Althoughthe light source 201 may be a laser light source or a light-emittingdiode, it should preferably be a lamp of a wide zone such as a halogenlamp, a metal halide lamp or a mercury lamp. Alternatively, a laser or alight-emitting diode having a plurality of wavelengths may be used, andsuch a plurality of wavelengths may be mixed by a dichroic mirror. Thereason for this is that single light tends to cause a multi-pathinterference within the transparent film to thereby shift projectedlight or a difference of reflectances due to a material or a pattern onthe sample tends to increase so that a large error tends to occur.

[0164] In the embodiment shown in FIG. 10, the cylindrical lens 213 islocated in front of the line image sensor 214. The reason for this isthat light is focused on the line image sensor 214 to increase aquantity of detected light and that an error is decreased by averagingreflected light from a wide area on the sample. However, the use of thecylindrical lens 213 is not an indispensable condition, and should bedetermined in response to the necessity.

[0165] A height detection algorithm of the sample surface 106 accordingto an embodiment will be described next with reference to FIG. 14. Letit be assumed that n is the total number of slits, p is the pitch andy(x) is the detection waveform. Also, let it be assumed that ygo(i)(i=0, . . . , n−1) represents the position of the peak corresponding toeach slit obtained when the height z=0 (relationship ofygo(i)=ygo(0)+p*i is satisfied).

[0166] 1. Scan y(x) and calculate a position xmax of maximum value.

[0167] 2. Calculate the substantial position of the peak i by searchingleft and right directions from xmax by each pitch p.

[0168] 3. Assuming that xo represents the peak position of the left end,then the substantial position of the peak i becomes xo+p*i. Thepositions of the left and right troughs xo+p*i−p/2, xo+p*i+p/2.

[0169] 4. Set ymin=max(y(xo+p*i−p/2), y(xo+p*i+p/2). That is, a largerone of left and right troughs is set to ymin.

[0170] 5. Set k to a constant of about 0.3, and setyth=ymin+k*(y(xo+p*i)−ymin). That is, set amplitude (y(xo+p*i)−ymin)*kto a range value (threshold value) yth.

[0171] 6. Calculate a center of gravity of y(x)−yth relative to a pointat which y(x)>yth is satisfied between xo+p*i−p/2 and xo+p*i+p/2, andset the value thus calculated to yg(i).

[0172] 7. Calculate weighted mean of yg(i)−ygo(i), and set thecalculated weighted mean to image shift.

[0173] 8. Calculate the height z by adding an offset to a value whichresults from multiplying the image shift with a detection gain(1/(2m·sinθ)).

[0174] In this manner, there is realized the height detection which isdifficult to be affected by the surface state of the sample 106.Incidentally, in this embodiment, the peak of the slit image is used butinstead a trough between the slit images may be used. Specifically, acenter of gravity of ythy−(x) is calculated with respect to a point ofy(x)<yth and set to a center of gravity of each trough. Then, theshifted amount of the whole image is obtained by averaging the movementamount of these trough images. Thus, there can be achieved the followingeffects. Since the detection waveform is determined based on the productof the projection waveform and the reflectance of the sample surface,the bright portion of the slit image is largely affected by thefluctuation of the reflectance, and the shape of the detection waveformtends to change. On the other hand, the trough portion of the waveformis difficult to be affected by the reflectance of the sample surface.Therefore, by the height detection algorithm based on the measurement ofthe movement amount of the trough between the slit images, it ispossible to reduce the detection error caused by the surface state ofthe object much more.

[0175] The height detection optical apparatus 200 a according to asecond embodiment according to the present invention will be describednext with reference to FIG. 15. In the first embodiment shown in FIG.10, since the multi-slit-shaped pattern 203 is projected from theoblique upper direction, when the sample surface 106 is elevated andlowered, the position at which the pattern is projected on the sample,i.e. the sample measurement position 217 is shifted and displaced fromthe detection center 110. Assuming that Z is the height of the sampleand θ is the projection angle, then this shift amount is represented byZtanθ. At that time, if the sample surface 106 is inclined by ε, thenthere occurs a detection error. The magnitude of this detection error isZ·tanθ·tanε. For example, when Z is 200 μm, θ is 70 degrees and tanε is0.005, the above-mentioned detection error becomes 2.7 μm. When thisproblem arises, the arrangement of the second embodiment shown in FIG.15 can achieve the effects. Specifically, the patternprojection/detection are carried out from the left and right symmetricaldirections, and the two detected values are averaged, whereby the heightof the constant point 110 can be obtained.

[0176] The second embodiment shown in FIG. 15 will hereinafter bedescribed in detail. Since the arrangement is symmetrical, the sameconstituents are constantly located at the corresponding positions, andhence the other side of the constituents need not be described. It is tobe appreciated that the projection and detection from the symmetricaldirection are also the same. Light emitted from the light source 201illuminates the mask 203 on which the multi-slit-shaped pattern isdrawn. Of the light, light reflected by the half mirror 205 is projectedby the projection/detection lens 220 onto the sample 106 at its position217. The multi-slit-shaped pattern projected on the sample 106 isregularly reflected and focused on the line image sensor 214 by theprojection/detection lens 220 disposed on the opposite side. At thattime, a luminous flux that has passed through the half mirror 205 isfocused on the line image sensor 214. Assuming that m is themagnification of the detection optical system, when the height of thesample is changed by z, the multi-slit image is shifted by 2 mz·sinθ onthe whole. By using this fact, the height of the sample 106 iscalculated from the shifted amounts of the left and right multi-slitimages. Then, an average value is calculated by using the heightdetection values of the left and right detection systems, and theaverage value thus calculated is obtained as a height detected value atthe final point 110. When the above-mentioned height detection apparatusis used as the auto focus height sensor, the height detection positionbecomes the optical axis of the upper observation system. Incidentally,it is needless to say that the half mirror 205 may be replaced with abeam splitter of cube configuration as long as the beam splitter passesa part of light and reflects a part of light. Moreover, similarly to thefirst embodiment shown in FIG. 10, by using the cylindrical lens 213,the longitudinal direction of the slit may be contracted and focused onthe line sensor 214.

[0177] The height detection optical apparatus 200 a according to a thirdembodiment of the present invention will be described next withreference to FIG. 16. Although this arrangement is able to constantlyobtain the height of the constant point 110 similarly to FIG. 15, inFIG. 15, a quantity of light is reduced to ½ by the half mirror 205 sothat, when light is passed through or reflected by the half mirror 205twice, a quantity of light is reduced to ¼. Therefore, if a polarizingbeam splitter 241 is inserted instead of the half mirror 205 and aquarter-wave plate is interposed between the polarizing beam splitter241 and the sample 106 as shown in FIG. 16, then it becomes possible tosuppress the reduction of the quantity of light to ½. Specifically,light emitted from the light source 201 illuminates the mask 203 havingthe multi-slit-shaped pattern formed thereon. Of the light, S-polarizedcomponent reflected by the polarizing beam splitter 241 is passedthrough the quarter-wave plate 242 and thereby converted intocircularly-polarized light. This light is projected by theprojection/detection lens 220 onto the sample 106 at its position 217.The multi-slit pattern projected onto the sample is regularly reflected,and then focused on the line image sensor 214 by theprojection/detection lens 220 disposed on the opposite side. At thattime, the circularly-polarized light is converted by the quarter-waveplate 242 into P-polarized light. This light is passed through thepolarizing beam splitter 242 without being substantially lost, and thenfocused on the line image sensor 214, thereby making it possible toreduce the loss of the quantity of light. Moreover, if a laser forgenerating polarized light is used as the light source 201 to enableS-polarized light to pass the first polarizing beam splitter 241, thenit becomes possible to substantially suppress the loss of the quantityof light. Assuming that m is the magnification of the detection opticalsystem, then when the height of the sample is changed by z, themulti-slit image is shifted by 2 mz·sinθ on the whole. By using thisfact, the height of the sample 106 is calculated from the shift amountsof the left and right multi-slit images. An average value is calculatedby using the two height detected values of the left and right detectionsystems, and the average value thus calculated is determined as a heightdetected value at the final point 110. When the height detection opticalapparatus is used as the auto focus height sensor, the height detectionposition 110 becomes the optical axis of the upper observation system.It is needless to say that the longitudinal direction of the slit may becontracted by using the cylindrical lens 213 and focused on the lineimage sensor 214 similarly to the first embodiment shown in FIG. 10.

[0178] Further, the manner in which an error caused by another cause canbe canceled out by using the arrangement of the second or thirdembodiment shown in FIG. 15 or 16 will be described with reference toFIG. 18. FIG. 18 is a partly enlarged view of FIG. 10, in whichreference numeral 210 denotes a projection lens and reference numeral215 denotes a detection lens. If reference numeral 218 denotes aconjugation surface or focusing surface formed on the image sensor 214by the detection lens 215, then the shift amount of projected light onthis conjugation surface 218 is detected on the image sensor 214. Whenthe height of the sample 106 is increased by z, the detection lightreflection position 217 is shifted from the height detection position110 by z·tanθ. Further, when the sample surface 106 is inclined by anangle grad, the detection light reflected on the reflection position 217is inclined by an extra angle of 2 εrad due to a so-called optical levereffect. Then, the detection light position on the conjugation surface218 is shifted by 2 εz·cos(π-2θ)/cosθ. Since a height detection errorresults from multiplying this shifted amount with ½ sinθ, the detectionerror caused by the inclination of grad of the sample 106 is representedby −2 εz/tan2θ. For example, assuming that z is 200 μm, θ is 70 degreesand tanε is 0.005, then the above-mentioned detection error becomes 2.4μm. When this problem arises, the arrangement of the second or thirdembodiment shown in FIG. 15 or 16 can achieve the effects. Specifically,the error caused by the above-mentioned optical lever effect becomes thesame magnitude and becomes opposite in sign when Rio the projection ordetection is carried out from the opposite direction as shown in FIG. 15or 16. Therefore, when height detection values from the left and rightimage sensors are averaged, an error can be canceled out. Thus, itbecomes possible to carry out the height detection which is free fromthe error caused by the inclination of the sample surface 106.

[0179] Next, the manner in which the height of the sample surface 106can be obtained accurately by the height calculating unit 200 b evenwhen the height z of the sample surface 106 is changed will be describedwith reference to FIGS. 19(a)-19(b). Although the optical system shownin FIG. 19(a) is identical to that shown in FIG. 10, if the height ofthe sample surface 106 is changed by z, then the detection position ofthe slit image is changed by z·tanθ. Since the pattern of the multi-slitshape is projected and the respective slits are reflected at differentpositions on the sample, the shift amount of each slit image reflects aheight corresponding to each reflected position on the sample.Specifically, as shown in FIG. 19(b), there is obtained surface-shapeddata of the sample 106. FIG. 19(b) shows a detection height of each slitwith respect to the detection position corresponding to the height ofthe sample surface 106. A measurement point shown by a dotted lineindicates measured data obtained when the sample 106 is located at thereference height. When the sample 106 is elevated by z, as shown by asolid line, the sample detection position corresponding to each slit isshifted to the left by z·tanθ. As is defined in the description of theembodiment shown in FIG. 10, assuming that p/cosθ is the pitch of themulti-slit-shaped pattern on the sample surface 106, then the slitcorresponding to the visual field center 110 of the upper observationsystem is shifted to the right by z·tanθ/(p/cosθ)=z·sinθ/p.

[0180] Therefore, the height calculating unit 200 b can select aplurality of slits containing this slit at the center, average heightdetection values from these slits, determine the value thus averaged asa final height detection value, and can accurately obtain the height atthe visual field center 110 of the upper observation system. In orderfor the height calculating unit 200 b to calculate z·sinθ/p, it isnecessary to know the height z. Since the z required may be anapproximate value for selecting the slit, the height that was calculatedpreviously or the detection height obtained before the detectionposition displacement is corrected may be used as the height z.Incidentally, the position equivalent to the visual field center 110 isshifted on the image sensor by zm sino as the height of the sample 106is changed by z.

[0181] Further, when the appearance is inspected on the basis of the SEMimage shown in FIGS. 3 and 4, the two-dimensional SEM images of acertain wide area should be latched. To this end, while the stage 105 ismoved continuously, the beam deflector 102 should be driven to scanelectron beams in the direction substantially perpendicular to thedirection in which the stage 105 is moved, and the secondary electrondetector 104 need detect the two-dimensional secondary electron imagesignal. Specifically, while the stage 105 is moved continuously in the Xdirection, for example, the beam deflector 102 should be driven to scanelectron beams in the Y direction substantially perpendicular to thedirection in which the stage 105 is moved, and then the stage 105 ismoved stepwise in the Y direction. Thereafter, while the stage 105 iscontinuously moved in the X direction, the beam deflector 102 should bedriven to scan electron beams in the Y direction substantiallyperpendicular to the direction in which the stage 105 is moved, and thesecondary electron detector 104 should detect the two-dimensionalsecondary electron image signal.

[0182] Also in this embodiment, the height detection apparatus 200should constantly detect the height of the surface of the inspectedobject 106 from which the secondary electron image signal is detectedand obtain the correct inspected result by executing the automatic focuscontrol.

[0183] However, due to an image accumulation time of the image sensor214 in the height detection optical apparatus 200 a, a calculation timein the height calculating unit 200 b, the responsiveness of the focusposition control apparatus 109 or the like, it is frequently observedthat a focus control is delayed. Therefore, even when the focus controlis delayed, light should be accurately focused on the surface of theinspected object 106 from which the secondary electron image signal isdetected. In FIG. 20, let it be assumed that the stage 105 iscontinuously moved from right to left. In this case, taking theabove-mentioned delay time into consideration, the height calculatingunit 200 b may calculate the height slightly shifted right from thevisual field center 110 of the upper observation system, and the focuscontrol apparatus 109 may control the focusing by controlling the focuscontrol current or the focus control voltage to the objective lens 103.The shift amount of the necessary detection position becomes a productVT of the above-mentioned delay time T and the scanning speed (movingspeed) V of the stage 105. Specifically, as shown in FIG. 20, the heightcalculating unit 200 b can obtain the values corresponding to theheights by using signals from images of slit groups shifted to the rightby VT/(p/cosθ) from the upper observation system visual field center 110detected from the image sensor 214, average the values thus obtained,and can detect the height in which the delay time is corrected bydetermining the averaged value as the final height detection value.Incidentally, the measurement position shift amount VT on the samplecorresponds to VTm·cosθ on the image sensor 214. As described above,even when the focus control is delayed, since the height calculatingunit 200 b can calculate the height of the surface of the inspectedobject 106 from which the secondary electron image signal is detected,the focus control apparatus 109 can accurately focus light on thesurface of the inspected object 106 from which the secondary electronimage signal is detected by controlling the focus control current or thefocus control voltage to the objective lens 103.

[0184] In this embodiment, the detection position displacement caused bythe change of the height of the sample surface 106 shown in FIG. 19(b)and the time delay shown in FIG. 20 are both corrected. When thetwo-side projection shown in FIGS. 15 and 16 is used, the detectionposition displacement caused by the change of the height of the samplesurface 106 is canceled out automatically so that only the time delaymay be corrected.

[0185]FIG. 21 shows an embodiment in which the time delay is correctednot by using the averaged value of the height detection values as shownin FIG. 20, but the final height detection value is calculated byapplying a straight line to the surface shape of the detected samplesurface 106. In this fashion, the height calculating unit 200 b mayapply a straight line to detected height data obtained from the positionof each slit according to the method of least squares, for example,calculate the height of the position shifted by −zm·sinθ+VTm·cosθ on theimage sensor (CCD) 214 by using the resultant straight line, and maydetermine the height thus obtained as the final detected height. Asshown in FIGS. 5(a)-5(c), when the surface shape of the sample surfaceis partly uneven like the semiconductor memory comprising the memorycell portion 3 c and the peripheral circuit portion 3 b, it is possibleto selectively detect only the height of the high portion of the surfaceshape of the sample surface by using a suitable method such as a Houghtransform instead of the method of least squares. As described above,even when the focus control is delayed, since the height calculatingunit 200 b calculates the height in accordance with the surface shape ofthe inspected object 106 from which the secondary electron image signalis detected, the focus control apparatus 109 can precisely focus lighton the surface shape of the inspected object 106 from which thesecondary electron image signal is detected by controlling the focuscontrol current or the focus control voltage to the objective lens 103.Also, as shown in FIGS. 5(a)-5(c), in the case of the semiconductormemory comprising the memory cell portion 3 c and the peripheral circuitportion 3 b which are different in height on the surfaces, it becomespossible to accurately focus light on the surface shape.

[0186] In the embodiment shown in FIGS. 19, 20, 21, there is illustratedthe detection time delay correction method obtained on the assumptionthat the scanning direction of the stage 2 and the projection-detectiondirection of multi-slit are substantially parallel to each other. Adetection time delay correction method that can be used regardless ofthe scanning direction of stage and the projection-detection directionof multi-slit will be described next. Since the line image sensor 214outputs image signals accumulated during a certain time T1, it can beconsidered that the line image sensor may obtain an average image of theperiod Ti. Specifically, data obtained from the line image sensor 214has a time delay of T1/2. Further, in order for the height calculatingunit 200 b formed of the computer, a constant time T2 is required. Thus,the height detection value indicates past information by a time of(T1/2)+2 in total. As shown in FIG. 22, assuming that detection valuesobtained at a constant interval are Z-m, Z-(m-1), . . . Z-2, Z-1, Z0,then the height calculating unit 200 b can estimate a present time Zcfrom these data. As shown in FIG. 22, for example, it is possible toobtain the present height Zc by extrapolating the latest detection valueZ0 and a preceding detection value with straight lines as in thefollowing equation of (expression 25):

Zc=Z 0+((Z 0)−(Z-1))×((T 1/2)+T 2)/T 1  (expression 25)

[0187] Extrapolation straight lines may of course be applied to morethan three points Z-m, Z-(m-1), . . . Z-2, Z-1, Z0 so as to reduce anerror or a quadratic function, a cubic function or the like may beapplied to these points. These extrapolation methods are mathematicallywell known, and when in use, the most suitable one may be selected inaccordance with the magnitude of the change of the height detectionvalue and the magnitude of the fluctuations.

[0188] As another embodiment, the manner in which the height detectionvalue is corrected and outputted will be described. When the heightdetection value changes stepwise at the interval T1, if the feedback isapplied to electron beams by using such stepwise height detectionvalues, then it is not preferable that the quality of electron beamimage is changed rapidly at the interval T1. In this case, in additionto the extrapolation height detection value Zc, an extrapolation heightdetection value Zc′ which is delayed by a time T1 from a time a iscalculated similarly. In the embodiment shown in FIG. 23, theextrapolation height detection values Zc and Zc′ are calculated by thefollowing equation of (expression 26):

Zc=(Z-1)+(((Z-1)−(Z-3))/(2T 1))×2.5T 1 Zc′=(Z 0)+(((Z 0)−(Z-2))/(2T1))×2.5T 1  (expression 26)

[0189] On the basis of these Zc and Zc′, the height Z1 which is delayedby t from the time a can be calculated by interpolation as in thefollowing equation of (expression 27):

Z 1=Zc+(Zc′−Zc)t/T 1  (expression 27)

[0190] As described above, the detection time delay caused by the CCDstorage time and the height calculation time can be corrected. Thus,even when height of the inspected object 106 is change every moment, aheight detection value with a small error can be obtained, and afeedback can be stably applied to the electron optical system whichcontrols electron beams.

[0191] Further, in the electron optical system shown in FIGS. 2, 3, 4and 7, since the focus position thereof can be controlled at a highspeed by a focus control current or a focus control voltage, thefocusing can be made by an embodiment shown in FIG. 24. Specifically,while electron beams are scanned once, the focus control apparatus 109dynamically changes the focus position by controlling the focus controlcurrent or the focus control voltage to the objective lens 103 such thatthe position thus changed may agree with the surface shape of the samplesurface 106 detected by the height detection optical apparatus 200 a andwhich is calculated by the height calculating unit 200 b. Since theheight calculating unit 200 b is able to calculate the surface shape ofthe sample surface 106 from the image signal of the multi-slit-shapedpattern obtained from the image sensor 214 of the height detectionoptical apparatus 200 a, while electron beams are scanned once, thefocus control apparatus 109 can realize the properly-focused state bycontrolling the focus control current or the focus control voltage tothe objective lens 103 in accordance with the surface shape of thesample surface 106 thus calculated. Thus, when an inspected object has alarge stepped structure like a semiconductor memory, it becomes possibleto accurately focus light on the inspected object constantly.

[0192]FIG. 25 shows another embodiment of the two-side projection systemshown in FIGS. 15 and 16. Specifically, in the embodiment shown in FIG.25, two optical systems according to the embodiment shown in FIG. 10 areprepared and disposed side by side in which the detection directions aremade opposite to each other. As shown in FIGS. 15 and 16, it is possibleto realize a function equivalent to that of the arrangement which makesthe left and right optical system common by using the half mirror 205.Specifically, also in the embodiment shown in FIG. 25, as the samplesurface 106 is elevated and lowered, the detection apparatus 217 ismoved right and left with the result that the position of the center ofthe detection apparatus 217 composed of the two optical systems canalways be made constant. Therefore, it is possible to detect the heightat the constant position 110 by averaging the height detection valuesobtained from these optical systems. Thus, it is possible to construct aheight detector which can prevent a detection error from being causedwhen the detection position is displaced by the fluctuation of theheight. However, since the patterns of multi-slit shape are projected atdifferent positions, when the surface of the inspected object 106 hassteps and undulations, detection light is not irradiated on the point110 and a detection error occurs. Accordingly, the present invention isapplicable when the surface of the inspected object has small steps andundulations.

[0193] Furthermore, FIG. 26 shows another embodiment of the two-sideprojection system shown in FIGS. 15 and 16. Specifically, in theembodiment shown in FIG. 26, two optical system use an illumination andan image sensor. Light emitted from a light source 201 illuminates amask pattern 203 of multi-slit shape. Light passed through a multi-slit203 is traveled through a half mirror 205, converted by a lens 264 intoparallel light, reflected by a mirror 206, and branched by a branchingoptical system (roof mirror) 266 into two multi-slit light beams. Themulti-slit light beams thus branched are projected by aprojection/detection lens 220 through a mirror 267 to thereby focus animage of a mask pattern 203 at the measurement position 217 on thesample 106. An incident angle obtained at that time is assumed as θ. Apair of multi-slit light beams reflected on the surface of the sample106 are returned through the same light paths as those of projectedlight and reached to the half mirror 205. Specifically, a pair ofmulti-slit light beams reflected on the surface of the sample 106 arereflected on the respective mirrors 267, traveled through the respectiveprojection/detection lenses 220, reflected on the respective mirrors265, reflected on the branching optical system 266, reflected on themirror 206, synthesized by the lens 264 and reached to the half mirror205. Light reflected on the half mirror 205 is focused on the imagesensor 214. On the sensor 214, light beams that were branched into twodirections by the branching optical system 266 are synthesized one moretime so that only one illumination system and one image sensor 214 aresufficient. Moreover, since the height calculating unit 200 b mayprocess only one waveform, a load may be decreased. Therefore, it ispossible to inexpensively realize a height detection apparatus which canprevent a detection position from being displaced by the two-sideprojection system.

[0194] As another embodiment, instead of an arrangement for controllingan angle of the mirror 206 electrically, if the mirror 206 is controlledin such a manner that the position at which the slit-shaped patternimage is focused on the image sensor 214 always becomes constant, thenthe irradiated position 217 of detection light on the sample can bemaintained constant regardless of the height z of the sample 106. Whenthe mirror is controlled as described above, the rotation angle of themirror 206 and the height z are in proportion to each other so that theheight z of the sample can be detected by detecting the rotation angleof the mirror 206.

[0195]FIG. 27 shows an embodiment of another arrangement in which thedetection position can be prevented from being displaced. Although thelayout of the optical system is the same as that of the embodiment shownin FIG. 10, the whole of the detector can be elevated and lowered. Ifthe height of the whole of the detector is controlled such that theposition of the slit on the image sensor 214 always becomes constant,then the detection light irradiated position 217 can be maintainedconstant regardless of the height z of the sample 106. The height z ofthe whole of the detector presented at that time agrees with the heightz of the sample 106. Another advantage of this arrangement will bedescribed. In the embodiment shown in FIG. 10, if a magnification coloraberration exists in the lens 215, the position of the multi-slit imageon the image sensor 214 is displaced by the color of the sample surface217. That is, an error occurs in the detection height. As a result, itis necessary to suppress the color aberration of the lens 215. On theother hand, in the arrangement shown in FIG. 27, the center of themulti-slit pattern is constantly located on the optical axis undercontrol. Since the color aberration does not occur on the optical axis,the color aberration of the lens and the distortion of image do notcause the detection error. Therefore, it becomes possible to construct aheight detector of a small detection error by an inexpensive lens.Further, since the detection multi-slit pattern is not de-focused as theheight of the sample is changed, the size of each slit can be reduced toapproximately the limit of resolution of lens. Furthermore, there is theadvantage that a height detection error caused by the reflectancedistribution of the sample can be reduced.

[0196] A method of further decreasing a detection error by properlyselecting the slit direction will be described next with reference toFIG. 28. When a semiconductor apparatus is inspected or observed as asample, the semiconductor apparatus usually has a pattern such that anarea such as a memory mat portion 3 c is formed in each rectangular chipas shown in FIG. 28. Since it is customary that the memory mat portionhas small patterns formed thereon, light tends to scatter/diffracted,thereby resulting in a low reflectance portion being formed. When theslit is irradiated on this boundary portion, a symmetry of a detectionpattern obtained as a reflected light image is broken, and hence thereoccurs a detection error. On the other hand, when the longitudinaldirection of the slit is irradiated on the pattern with an inclinationangle φ relative to the pattern as shown in FIG. 28, a ratio of theportion in which the border line of the pattern crosses the slitrelative to the length L of the slit is reduced so that an amount inwhich a symmetry of a detection pattern is fluctuated by a difference ofreflectances at the boundary portion of the pattern can be decreased.That is, a detection error can be reduced. Thus, in addition to theerror reduction achieved by the multi-slit, it is possible to achieve afurther error reduction effect. In the embodiment shown in FIG. 28, theprojection & detection direction and the longitudinal direction of theslit are perpendicular to each other, which is not always necessary.Specifically, the angle of the longitudinal direction of the slitprojected on the sample 106 can be controlled by rotating the mask 203on which there is formed the multi-slit like pattern. At that time, thecylindrical lens 213 and the line image sensor 214 also should berotated in the direction opposing the sample 106 by the same angle asthat of the mask 203. Assuming that η is this angle, then the directionof the slit projected on the sample 106 is rotated byarctan(sinη/(cosncosθ)) in the projection direction.

[0197] While the method of correcting the detection position of theprojection direction by the multi-slit and the method of canceling outthe positional displacement by the two-side projection have beendescribed so far with respect to the phenomenon in which the detectionposition is displaced by the height z of the sample surface 106, amethod of reducing a displacement of a detection position in thelongitudinal direction of the slit, i.e. in the direction perpendicularto the projection direction will be described. When the longitudinaldirection of the slit is projected across areas having differentreflectances on the sample as shown in FIG. 29(a), detection light isgiven an intensity distribution in the longitudinal direction of theslit. In this case, the height distribution of the sample is reflectedon the height detection value with a weighting corresponding to thelight quantity distribution of this detected light. Specifically, theheight detection value considerably reflects information of the areahaving the high reflectance with the result that a height of a pointdisplaced from the height measurement point 110 is unavoidably measured.The resultant detection error is reduced as the size L of thelongitudinal direction of the slit is reduced. However, the detectionlight quantity is decreased and is easily affected by a localfluctuation of the reflectance on the surface of the sample. Therefore,the size of the slit cannot be reduced freely. Accordingly, as is seenin the embodiments shown in FIGS. 15, 16, 26, 27, in the arrangement inwhich detection light is projected from both sides, the projectionpositions are displaced in the longitudinal direction of the slit insuch a manner that the projection positions of the right and left slitsmay not overlap as shown in FIG. 29(b). Then, in the case of thisembodiment, only the multi-slit pattern of a direction 1 is projectedacross the two areas so that a height detection value based on adetection direction 2 does not cause an error. Thus, it is possible toreduce an error to ½ by averaging height detection values of thedetection direction 1 and the detection direction 2. In the embodimentshown in FIG. 29(b), the length of the slit is reduced to L/2 such thatthe total width of the projection areas of the projection direction 1and the projection direction 2 may become L. Consequently, as comparedwith FIG. 29(a), the detection position displacement of the longitudinaldirection of the slit can be reduced to ¼ on the whole.

[0198] An embodiment in which a two-dimensional distribution of theheight of the sample 106 is obtained will be described next withreference to FIG. 30. Light emitted from the light source 201illuminates the mask 203 with the pattern composed of rectangularrepeated patterns, for example. This light is projected by theprojection lens 210 at the position 217 on the sample 106. Themulti-slit pattern projected onto the sample is focused by the detectionlens 215 on the two-dimensional image sensor 214 such as a CCD. Assumingthat m is the magnification of the detection system, then when theheight of the sample is changed by z, the slit image is shifted by 2mz·sinθ. Since this shift amount reflects a height of a point at whichthe slit irradiates the sample, by using this shift amount, it becomespossible to detect the height distribution of the sample 106 in theirradiated range of the slit.

[0199] In the embodiment shown in FIG. 30, the stop 211 is disposed atthe front focus position of the projection lens 210, and the stop 216 isdisposed at the rear focus position of the detection lens 215. Thereason for this is that a magnification fluctuation caused when thesample 106 is elevated and lowered can be eliminated by disposing thelenses 210 and 215 in a sample-side tele-centric fashion. Consequently,the magnification fluctuation caused by the change of the height of thesample surface 106 can be suppressed, and a detection linearity can beimproved.

[0200] Moreover, as in the embodiment shown in FIG. 30, the polarizingfilter 240 is disposed at the front of the projection lens 210 toselectively project S-polarized light. The reason for this is that, whena pattern formed on an insulating film or the like is inspected on thebasis of the SEM image, the insulating film is a transparent film andtherefore a multi-path reflection can be prevented in the transparentfilm, thereby making it possible to inspect the above-mentioned patternwhile a difference of reflectances between the materials is suppressed.The polarizing filter 240 is not always disposed in front of theprojection lens, and may be interposed between the light source 201 andthe detector 214 with substantially similar effects being achieved.

[0201] With respect to a multi-slit shift amount detection algorithmexecuted by the height calculating unit 200 b, an embodiment differentfrom FIG. 14 will be described next. FIG. 31 shows a method of detectinga phase change φ of a cyclic waveform. Assuming that p is a pitch of amulti-slit shaped pattern, then the phase change φ(rad) corresponds to ashift amount pφ/2n. This shift amount corresponds to a height changepφ/(2 nm·sinθ) so that the height detection is concluded as thedetection of the phase change of the cyclic waveform. The heightdetection in the height calculating unit 200 b can be realized by aproduct sum calculation. Specifically, the detection waveform is assumedto be y(x). Then, a product sum of the detection waveform and a functiong(x)=w(x)exp(i2πx/p), and a resultant phase may be obtained where i isthe imaginary number unit, and w(x) is the correlation function of aproper real number. When this correlation function is a Gaussianfunction, w(x) is, in particular, called a Gavore filter, and w(x) maybe any function as long as the function may be smoothly lost at therespective ends. While the complex function is employed in the abovedescription, it will be expressed by a real number as follows. Havingcalculated the product sum of gr(x)=w(x)·cos(i2πx/p) andgi(x)=w(x)·sin(i2πx/p) with y(x), results are set to R and I,respectively. Then, the phase of y(x) is represented as φ=arctan(I/R).However, since this phase is folded in a range of −π to π, phases may becoupled by searching the previous detection phases without a dropout oran approximate value of 2π-order of the phase is calculated bycalculating the approximate position of the peak. Incidentally, whilethe weighting function w(x) and the width of the waveform y(x) are madesubstantially equal in this example, the portion which overlaps theweighting function w(x) is selected from the multi-slit image byreducing the width of the weighting function w(x) relative to thewaveform y(x), and the shift amount of this portion can be calculated.Furthermore, by using a weighting function for selecting a right halfportion from the multi-slit pattern existing range and a weightingfunction for selecting a left half portion from the multi-slit patternexisting range, the heights of the left half portion and the right halfportion can be calculated with respect to the measurement position onthe sample. Then, it is possible to obtain the height and theinclination of the sample by using such calculated results.

[0202] Furthermore, while the above-mentioned algorithm constructs thefilter matched with the pitch p of the well-known multi-slit shapedpattern and uses this filter to detect the phase, the present inventionis not limited thereto, and an FFT (Fast Fourier Transform) is effectedon y(x) and a phase corresponding to a peak of a spectrum is obtained,thereby making it possible to detect the phase of the waveform y(x).

[0203] An embodiment of another slit shift amount measuring algorithmwill be described next with reference to FIG. 32. In the embodimentshown in FIG. 14, the displacement of the slit image is measured byusing the center of gravity. According to this method, such displacementis converted into a height on the basis of the position of the edge ofthe slit image. Initially, similarly to the embodiment shown in FIG. 14,the peak of each slit and the positions of troughs on the respectivesides are calculated and a proper threshold value yth is calculated fromthe amplitude. Then, searching two points across this threshold valueyth, resultant two points are set to (xi, yi) and (xi+1, yi+1). Then, xcoordinates of a point at which the line connecting the above two pointsand threshold value cross each other are expressed by xi+(xi+1−xi)(yth−yi)/(yi+1−yi). This operation is effected on each of left and rightinclined portions of the slit, the positions of the crossing pointsbetween the threshold values and this line are calculated, and then amiddle point is determined as the position of the slit.

[0204] Moreover, the peak position of the slit can be determined as theposition of the slit. The interpolation is executed in order tocalculate the peak position with an accuracy below pixel. There arevarious interpolation methods. When a quadratic function interpolation,for example, is carried out, if three points before and after themaximal value are set to (x1−Δx, y0), (x1, y1) and (x1+Δx, y2), then thepeak position is expressed by x1+Δx (y2−y0)/{2 (2·y2−y2−y0)}.

[0205] While the above-mentioned methods have been described so far onthe assumption that the position of the slit is calculated, the presentinvention is not limited thereto, and the position of the trough of thedetection waveform is calculated and the shift of this position isdetected, thereby making it possible to obtain the height of the sample.If so, the following effects can be achieved. The amount in which thewaveform of the detection multi-slit pattern is fluctuated by thereflectance distribution on the surface of the sample increases muchmore when the reflectance boundary coincides with the peak portion ofthe multi-slit image as compared with the case in which the reflectanceboundary coincides with the trough portion. The reason for this is thatthe detected light quantity distribution is determined based on aproduct of the light quantity distribution obtained when the reflectanceof the sample is constant and the reflectance of the sample.Consequently, the bright portion tends to cause the change of thedetected light quantity relative to the change of the same reflectance.Accordingly, if the position of the trough portion having the smallfluctuation of the waveform is calculated, the position of the slitimage can be detected and the height of the sample can be detected witha small error independently of the state of the reflectance of thesample. As the method of detecting the position of the trough portion,there may be used the algorithm for calculating a center of gravityrelative to a code-inverted waveform −y(x) shown in FIG. 14 and thealgorithm for calculating the point crossing the threshold value by theinterpolation shown in FIG. 32.

[0206] A method of detecting the position of the multi-slit imagewithout the linear image sensor will be described next with reference toFIGS. 33(a)-33(b). As shown in FIG. 33(a), light emitted from a lightsource 201 illuminates a mask 203 on which the multi-slit shaped patternis drawn. This multi-slit pattern is projected by a projection lens 210at a position 217 on a sample 106. The multi-slit pattern projected ontothe sample is focused by a detection lens 215 on a mask pattern 245. Aquantity of light passed through this mask pattern 245 is detected by aphotoelectric detector 246. The mask pattern 245 is the pattern havingthe same pitch as that of the mask 203, and is vibrated about h atasin2πft. In synchronism therewith, an output 248 of the photoelectricdetector 246 is vibrated. If this is synchronizing-detected, then thedirection of the positional displacement between the multi-slit imageand the vibrating mask pattern 245 can be detected. If this detectedpositional displacement is fed back to the vibration center h of thepattern 245, then the position of the multi-slit image and the positionof the vibrating mask pattern 245 can agree with each other constantly.Since the vibration center h of the pattern 245 obtained at that time isequal to 2 mz·sinθ, the height of the sample can be obtained from thisfact. FIG. 33(b) is a block diagram showing this fact. An oscillator 249supplies a signal of sine wave of asin2πft. This sine wave signal issupplied to a multiplier 251, in which it is multiplied with a signalv(t) (248) from the photoelectric detector 246 and supplied through alow-pass filter 252. Since this signal indicates the positionaldisplacement from the multi-slit image of the mask 246, this signal isinputted to a temporary delay loop composed of a subtracter 253(subtracts h (=2 mz·sinθ) obtained from a gain 255), an integrator 254,and the gain 255. This output becomes the vibration center h of the mask245. The mask 245 is driven by a drive signal 247 which results fromadding the signal asin2πft from the oscillator 249 to this signal. Thus,it is possible to maintain the multi-slit image and the vibration centerposition h of the mask pattern 245 coincident with each other.

[0207] An embodiment concerning a method of correcting a focus controlcurrent or a focus control voltage and a focus position of chargedparticle optical system (objective lens 103) in the observation SEMapparatus and the length measuring SEM apparatus including theappearance inspection SEN apparatus shown in FIG. 2 or 3 or 4 or 7 willbe described. When a relationship between the control current and thefocus position is nonlinear, a nonlinear correction is required. Amethod of evaluating a linearity and determining a correction value willbe described. A correction standard pattern 130 shown in FIG. 35 isfixed to a sample holder on the stage 2 which holds the inspected object106 and located as shown in FIG. 34. The correction standard pattern 130is made of a conductive material so as to prevent the correctionstandard pattern from being charged when electron beams 112, which arecharged particle beams, are scanned.

[0208] Upon correction, on the basis of the command from the entiretycontrol unit 120, the stage control apparatus 126 is controlled in sucha manner that this correction standard pattern 130 is moved about theupper observation system optical axis 110 in the observation area. Theentirety control unit 120 uses this standard pattern 130 to obtain fromthe focus control apparatus 109 the focus control current or the focuscontrol voltage under which the secondary electron image signal (SEMimage signal) which is the charged particle beam image detected by thesecondary electron detector 104 which is the charged particle detectorbecomes clearest at each point, and measures the same. At that time, thevisibility of the secondary electron image (SEM image) which is thecharged particle beam image is detected by the secondary electrondetector 104. A digital SEM image signal converted by the A/D converter39 (122) or the digital SEM image signal pre-processed by thepre-processing circuit 40 is inputted to the entirety control unit 120and thereby displayed on the display 143 or stored in the image memory47 and displayed on the display 50, thereby being visually confirmed ordetermined by the image processing for calculating a changing rate of animage at the edge portion of the SEM image inputted to the entiretycontrol unit 120. Since the real height of the correction sample surface(correction standard pattern 130) is already known, if this heightinformation is inputted by using an input (not shown), then the entiretycontrol unit 120 is able to obtain a relationship between the realheight of the sample surface and the optimum focus control current orfocus control voltage by the above-mentioned measurement as shown inFIG. 36(a). Simultaneously, the height detection optical apparatus 200 aand the height calculating unit 200 b measure the height of thecorrection standard pattern 130, whereby the entirety control unit 120obtains a correction curve indicative of a relationship between the realheight of the sample surface and a measured height detection valuemeasured by the height detection optical apparatus 200 a and the heightcalculating unit 200 b as shown in FIG. 36(b). A study of these twocorrection curves reveals that the entirety control unit 120 can detect,from the detection values obtained by the height detection opticalapparatus 200 a and the height calculating unit 200 b, the optimum focuscontrol current or focus control voltage under which a properly-focusedcharged particle beam image is picked up. Moreover, instead of obtainingseparately two sets of correction curves of the height of the samplesurface and the detection value obtained by the height detection opticalapparatus 200 a or the like and the real height of the sample surfaceand the focus control current or focus control voltage, the entiretycontrol unit 120 may directly obtain a correction curve presentedbetween the detection value obtained by the height detection opticalapparatus 200 a and the focus control current or focus control voltageas shown in FIG. 36(c). In this case, the real height of the correctionstandard pattern 130 need not be detected.

[0209] Specifically, as shown in FIG. 38, the correction is made byusing the correction standard pattern 130. In a step S30, a correctionis started. In a step S31, the entirety control unit 120 issues acommand to the stage control apparatus 126 in such a manner that theposition n of the correction sample piece 130 is moved to the opticalaxis 110 of the electron optical system. Then, a step S32 and steps S33to S38 are executed in parallel to each other. In the step S32, theentirety control unit 120 issues a height detection command to theheight calculating unit 200 b to thereby obtain non-corrected heightdetection data Zdn. At the same time, in the steps 33, the entiretycontrol unit 120 issues a command to the focus control apparatus 109 sothat the focus control signal of the electron optical system (objectivelens 103) matches Ii. Next, in the step S34, the entirety control unit120 issues a command to the deflection control apparatus 108 so thatelectron beams are scanned in a one-dimensional or two-dimensionalfashion. In the next step S35, the entirety control unit 120 issues acommand to the image processing unit 124 so that the SEM image thusobtained is processed to calculate a visibility Si of an image. In thenext step S36, i=i+1 is set in the focus control signal Ii of theelectron optical system (objective lens 103). Until i≦Nn is satisfied inthe step S37, the steps S33 to S35 are repeated to thereby obtain thevisibility Si of the image in each focus control signal Ii. If a NO isoutputted in the inequality of i≦Nn in the step S37, then in the stepS38, the entirety control unit 120 calculates the focus control signalIn, in which the visibility Si of the image becomes maximum.

[0210] In the next step S39, the entirety control unit 120 issues acommand to the image processing unit 124 in such a manner that the imageprocessing unit obtains an image distortion parameter composed of animage magnification correction, an image rotation correction or the likein each height Zn in the correction sample piece 130 and stores theimage distortion correction parameter thus obtained in the memory 142.In the next step S40, the position n on the sample piece 130 is set ton=n+1. Then, until n≦Nn is satisfied in a step S41, the steps S31 to S39are repeated to thereby obtain the focus control signal In under whichthe visibility of the image in the height Zdn of each sample piecebecomes maximum and the image distortion correction parameter composedof the image magnification correction, the image rotation correction orthe like. If a NO is outputted in the inequality of n≦Nn at the stepS41, then in a step S42, the entirety control unit 120 obtains acorrection curve shown in FIG. 36(c) from the focus control signal Inunder which a visibility of an image in the non-corrected heightdetection value Zdn and the height Zdn of each sample piece becomesmaximum or if the real height Zn of each position n of the sample piece130 is already known, the entirety control unit obtains correctioncurves shown in FIGS. 36(a), (b) from Zdn, Zn, In. Then, in a step S43,the entirety control unit 120 obtains a parameter (e.g. coefficientapproximate to polynomial) of the above-mentioned correction curve, andstores the parameter thus obtained in the memory 142. Then, theprocessing is ended (S44).

[0211] Incidentally, the correction standard pattern 130 shown in FIG.35 has flat respective ends, and hence can correct a gain and an offsetby effecting the correction in the above-mentioned two portions. Whilethe correction standard pattern 130 has the correction curve of whichthe shape is stable, it is effective for executing a prompt correctionwhen only a gain and an offset drift. When the shape of the correctioncurve is very stable and can be corrected by other methods, the gain andoffset between the control currents to the optical system heightdetection optical apparatus 200 a and the objective lens 103 may becorrected by the standard pattern having a one step difference as shownin FIG. 37(a). Moreover, when the shape of the correction curve is asimple shape that can be approximated by the quadratic function, theremay be used the standard pattern having two step differences as shown inFIG. 37(b).

[0212] Furthermore, when the charged particle beam apparatus such as theSEM apparatus has the Z stage, the Z stage is moved and detected inheight not by the standard pattern shown in FIG. 37, but by an ordinarypattern having no step difference, and the image is evaluated, therebymaking it possible to correct the control currents to the heightdetection optical apparatus 200 a and the objective lens 103. In thiscase, although the focus can be adjusted by the Z stage, if a responsivespeed of the stage is not sufficient relative to a speed at which theobservation portion is changed, then the stage is placed in the fixedstate, and the focus can be adjusted by the control current to theobjective lens 103.

[0213] The manner in which the correction is executed by using thecorrection parameter thus obtained and an appearance is inspected on thebasis of the SEM image in the SEM apparatus shown in FIG. 2 or 3 will bedescribed with reference to a flowchart shown in FIG. 39. Specifically,in a step S70, the processing is started. In the next step S71, theentirety control unit 120 reads out the correction parameter from thememory 142, loads a height detection apparatus correction parameter tothe height calculating unit 200 b, loads a height-focus control signalcorrection parameter to the focus control apparatus 109, and loads animage distortion correction parameter such as an image magnificationcorrection to the deflection control apparatus 108.

[0214] In the next step S72, the entirety control unit 120 issues acommand to the stage control apparatus 126 so that the stage controlapparatus moves the stage to a stage scanning start position. Then,steps S73, S74, S75, S76 are executed in parallel to each other. In thestep S73, the entirety control unit 120 issues a command to the stagecontrol apparatus 126 so that the stage control apparatus 126 drives thestage 2 with the inspected object 106 resting thereon at a constantspeed. Simultaneously, in the step S74, the entirety control unit 120issues a command to the height calculating unit 200 b such that theheight calculating unit 200 b outputs correction detection heightinformation 190 based on real time height detection and height detectionapparatus correction parameters obtained from the height detectionoptical apparatus 200 a to the focus control apparatus 109 and thedeflection control apparatus 108. Further, at the same time, in the stepS75, the entirety control apparatus 120 issues commands to the focuscontrol apparatus 108 and the deflection control apparatus 109 such thatthe focus control apparatus 108 and the deflection control apparatus 109continuously execute the focus control by using height-focus controlsignal correction parameters based on the scanning of electron beams andthe corrected detection height and the deflection distortion correctionby using the image distortion correction parameters such as imagemagnification correction based on the corrected detection height.Furthermore, at the same time, in the step S76, the entirety controlunit 120 issues a command to the image processing unit 124 such that theappearance inspection is executed by obtaining SEM images continuouslyobtained from the image processing unit 124.

[0215] In the next step S77, at the stage scanning end position, theentirety control unit 120 displays the inspected result received fromthe image processing unit 124 on the display 143 or stores the aboveinspected result in the memory 142. If it is determined at the next stepS78 that the inspection is not ended, then a control goes back to thestep S72. If it is determined at the step S78 that the inspection isended, the processing is ended (step S79).

[0216] While the SEM apparatus (electron beam apparatus) has beendescribed so far in the above-mentioned embodiments, the presentinvention may be applied to other converging charged beam apparatus sucha converging ion beam apparatus. In that case, the electron gun 101 maybe replaced with an ion source. Then, in this case, while the secondaryelectron detector 104 is not always required, in order to monitor thestate manufactured by the ion beams, a secondary electron detector orsecondary ion detector may be disposed at the position of the secondaryelectron detector 104. Further, the present invention may also beapplied to manufacturing apparatus of a wide sense which includes apattern writing apparatus using electron beams. In this case, while thesecondary electron detector 104 is not always required, because the mainpurpose is to utilize the electron beam for writing patterns on thesample 106, the secondary electron detector should preferably be usedsimilarly in order to monitor the processing state or to align theposition of the sample.

[0217] It is apparent that optical apparatus such as ordinary opticalmicroscope, optical appearance inspection apparatus and optical exposureapparatus may similarly construct an automatic focus mechanism by usingthe present height detection apparatus if they have a mechanism forcontrolling a focus position. In the case of apparatus in which a sampleis not elevated and lowered in order to achieve the properly-focusedstate but a focus position of an optical system is changed, suchapparatus can receive particularly remarkable effects of characteristicsof highly-accurate height detection of wide range achieved by thepresent height detection apparatus. FIG. 40 is a diagram showing theembodiment of this case. Only points different from those of FIG. 2 willbe described. Reference numeral 191 denotes a light source from whichillumination light is irradiated on the sample 106 through a lens 196, ahalf mirror 195, and an objective lens 193. This image is traveledthrough the objective lens 193, reflected by the half mirror 195, andfocused on an image detector 194 through a lens 197. At that time, thefocus of the objective lens 193 should be properly focused on thesurface of the sample 106. At that time, light can be properly-focusedat a high speed if the apparatus includes the height detector 200. Inthis embodiment shown in this sheet of drawing, light isproperly-focused by elevating and lowering the objective lens 193 butinstead light may be properly-focused by elevating and lowering thestage 105. However, if the objective lens 193 is elevated and lowered,then effects of characteristics in which the present height detector 200can execute the highly-accurate height detection in a wide range canobedemonstrated more remarkably. Alternatively, the properly-focused statemay of course be established by elevating and lowering the whole ofoptical system comprising 191, 193, 195, 196, 197, 194. Further, anoptical system appearance inspection apparatus may be arranged by addingthe image processing unit 124 or the like shown in FIGS. 2 and 3 to thearrangement shown in FIG. 40. Furthermore, a laser material processingmachine may be arranged by using the arrangement of the embodiment shownin FIG. 40.

[0218] According to the present invention, the image distortion causedby the deflection and the aberration of the electron optical system canbe reduced, and the decrease of the resolution due to the de-focusingcan be reduced so that the quality of the electron beam image (SEMimage) can be improved. As a result, the inspection and the measurementof length based on the electron beam image (SEM image) can be executedwith high accuracy and with high reliability.

[0219] Additionally, according to the present invention, if the heightinformation of the surface of the inspected object detected by theoptical height detection apparatus and the correction parameters betweenthe focus control current or the focus control voltage of the electronoptical system and the image distortion such as the image magnificationerror are obtained in advance, then the most clear electron beam image(SEM image) can be obtained from the inspected object without imagedistortion, and the inspection and the measurement of length based onthe electron beam image (SEM image) can be executed with high accuracyand with high reliability.

[0220] Further, according to the present invention, in the electron beamsystem inspection apparatus, since the height of the surface of theinspected object can be detected real time and the electron opticalsystem can be controlled real time, an electron beam image (SEM image)of high resolution without image distortion can be obtained by thecontinuous movement of the stage, and the inspection can be executed.Hence, an inspection efficiency and its stability can be improved. Inaddition, an inspection time can be reduced. In particular, thereduction of the inspection time is effective in increasing a diameterwhen the inspected object is the semiconductor wafer.

[0221] Furthermore, according to the present invention, similar effectscan be achieved also in observation manufacturing apparatus usingconverging charged particle beams.

What is claimed is:
 1. An electron beam apparatus, comprising: a tablewhich mounts a specimen and is movable in three dimensional directions;an electron optical system including an electron beam source, an elementfor deflecting electron beams emitted from the electron beam source, anobjective lens for converging and irradiating electron beams deflectedby the deflection element onto a specimen mounted on the table and adetector for detecting a secondary electron emanated from the specimenby the irradiation of the electron beams; a surface height detectionunit which optically detects a height of a surface of the specimen byprojecting light onto the surface of the specimen from an obliquedirection to the surface and detecting light reflected from thespecimen; and a focus controller which focuses the electron beam ontothe surface of the specimen by controlling a position of the table in aheight direction in accordance with information of the height from thesurface height detection unit.
 2. An electron beam apparatus accordingto claim 1, wherein the surface height detection unit projects arepetitive light pattern onto the surface of the specimen and detectslight reflected from the specimen with a linear sensor.
 3. An electronbeam apparatus according to claim 1, further comprising an image dataprocessing unit which receives secondary electron image data from thedetector of the electron optical system and processes the received imagedata.
 4. An electron beam apparatus according to claim 3, furthercomprising a display unit which displays a secondary electron image ofthe surface of the specimen outputted from the image data processingunit.
 5. A method of obtaining an image of a specimen, comprising thesteps of: irradiating an electron beam onto a specimen set on a table;optically detecting height of a surface of the specimen set on the tableby projecting light onto the surface of the specimen from an obliquedirection to the surface and detecting light reflected from thespecimen; focusing the electron beam onto the surface of the specimen bycontrolling a position of the table in a height direction in accordancewith the optically detected height information; obtaining an image ofthe surface of the specimen by detecting a secondary electron emanatedfrom the surface by the irradiation of the electron beam focused on thesurface; and outputting information of a secondary electron image of thesurface of the specimen obtained by the obtaining step.
 6. A methodaccording to claim 5, wherein the step of outputting includes displayingthe secondary electron image on a monitor screen.
 7. A method ofobtaining an image of a specimen, comprising the steps of: setting aspecimen on a table; irradiating an electron beam on a specimen set onthe table; optically detecting a height of a surface of the specimen seton the table which moves in a predetermined direction by projectinglight onto the surface of the specimen from an oblique direction to thesurface and detecting light reflected from the specimen; focusing theelectron beam onto the surface of the specimen by controlling a positionof the table in a height direction in accordance with information of theoptically detected height; obtaining an image of the surface of thespecimen by detecting a secondary electron emanated from the surface bythe irradiation of the electron beam focused on the surface; andprocessing the obtained image and outputting the processed image.
 8. Amethod according to claim 7, further comprising a step of displaying asecondary electron image of the surface of the specimen obtained by theobtaining step on a monitor screen.
 9. A method of obtaining an image ofa specimen, comprising the steps of: irradiating an electron beam on aspecimen set on a table; optically detecting a height of a surface of aspecimen set on the table; focusing the electron beam onto the surfaceof the specimen by controlling a relative position of a height directionbetween a focus position of an electron optical system from which theelectron beam is irradiated and the table in accordance with informationof the optically detected height; obtaining an image of the surface ofthe specimen by detecting a secondary electron emanated from the surfaceof the specimen by the irradiation of the electron beam focused on thesurface; processing the obtained image; and displaying a processedinformation on a monitor screen.
 10. A method according to claim 9,wherein the table continuously moves at least in one direction whileoptically detecting height of the surface of the specimen set on thetable.
 11. A method according to claim 9, wherein the focusing theelectron beam onto the surface of the specimen is conducted bycontrolling a position of the table in a height direction in accordancewith the optically detected height information.
 12. A method accordingto claim 9, wherein the processing includes inspection or measurement ofthe obtained image.
 13. A method of inspecting a specimen, comprisingthe steps of: irradiating an electron beam on a specimen set on a table;optically detecting height of a surface of a specimen set on the table;focusing the electron beam onto the surface of the specimen bycontrolling a relative position of a height direction between a focusposition of an electron optical system from which the electron beam isirradiated and the table in accordance with information of the opticallydetected height; obtaining an image of the surface of the specimen bydetecting a secondary electron emanated from the surface of the specimenby the irradiation of the electron beam focused on the surface;processing the obtained image to detect a defect of the specimen; andoutputting information of the detected defect on a monitor screen.
 14. Amethod according to claim 13, wherein the step of optically detectingheight of the surface of the specimen includes projecting a lightpattern onto the surface of the specimen from an oblique direction tothe surface and detecting a reflected light from the surface.
 15. Amethod according to claim 13, wherein the step of processing includescomparing the obtained image with another obtained image to detect adefect.
 16. A method according to claim 13, wherein the step ofoutputting information of the detected defect includes displaying animage of the detected defect on a monitor screen.